diff options
| -rw-r--r-- | libfstools/common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libfstools/common.c b/libfstools/common.c index 46b8114..1492793 100644 --- a/libfstools/common.c +++ b/libfstools/common.c @@ -128,10 +128,20 @@ int block_file_identify(FILE *f, uint64_t offset) static bool use_f2fs(struct volume *v, uint64_t offset, const char *bdev) { + char typeparam[BUFLEN]; uint64_t size = 0; bool ret = false; int fd; + if (get_var_from_file("/proc/cmdline", "fstools_overlay_fstype", typeparam, sizeof(typeparam))) { + if (!strcmp("f2fs", typeparam)) + return true; + else if (!strcmp("ext4", typeparam)) + return false; + else if (strcmp("auto", typeparam)) + ULOG_ERR("unsupported overlay filesystem type: %s\n", typeparam); + } + fd = open(bdev, O_RDONLY); if (fd < 0) return false; |