diff options
Diffstat (limited to 'fastboot/fs.c')
-rw-r--r-- | fastboot/fs.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/fastboot/fs.c b/fastboot/fs.c index cd4b880..8a15e6f 100644 --- a/fastboot/fs.c +++ b/fastboot/fs.c @@ -1,5 +1,6 @@ #include "fastboot.h" #include "make_ext4fs.h" +#include "make_f2fs.h" #include "fs.h" #include <errno.h> @@ -28,15 +29,23 @@ static int generate_ext4_image(int fd, long long partSize) return 0; } +#ifdef USE_F2FS +static int generate_f2fs_image(int fd, long long partSize) +{ + return make_f2fs_sparse_fd(fd, partSize, NULL, NULL); +} +#endif + static const struct fs_generator { char *fs_type; //must match what fastboot reports for partition type int (*generate)(int fd, long long partSize); //returns 0 or error value } generators[] = { - - { "ext4", generate_ext4_image} - + { "ext4", generate_ext4_image}, +#ifdef USE_F2FS + { "f2fs", generate_f2fs_image}, +#endif }; const struct fs_generator* fs_get_generator(const char *fs_type) |