From fc79767fc26d8782403e7b1afa7b93d518a86b19 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 7 Apr 2015 20:12:50 -0700 Subject: Use 64-bit file sizes in fastboot. Bug: 20110580 Change-Id: I5d3718103ff581ff3b5241c8b0e52b585b4f37e5 --- fastboot/fs.cpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'fastboot/fs.cpp') diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp index d8f9e165d..c58a505b7 100644 --- a/fastboot/fs.cpp +++ b/fastboot/fs.cpp @@ -6,21 +6,12 @@ #include #include #include -#include -#include #include #include #include -#include #include -#ifdef USE_MINGW -#include -#else -#include -#endif - - +#include static int generate_ext4_image(int fd, long long partSize) { @@ -48,15 +39,13 @@ static const struct fs_generator { #endif }; -const struct fs_generator* fs_get_generator(const char *fs_type) -{ - unsigned i; - - for (i = 0; i < sizeof(generators) / sizeof(*generators); i++) - if (!strcmp(generators[i].fs_type, fs_type)) +const struct fs_generator* fs_get_generator(const char* fs_type) { + for (size_t i = 0; i < sizeof(generators) / sizeof(*generators); i++) { + if (strcmp(generators[i].fs_type, fs_type) == 0) { return generators + i; - - return NULL; + } + } + return nullptr; } int fs_generator_generate(const struct fs_generator* gen, int tmpFileNo, long long partSize) -- cgit v1.2.3