This patch allows different prog names like fsck_f2fs, sload_f2fs, etc for
android.

Signed-off-by: Jaegeuk Kim <[email protected]>
---
 fsck/main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/fsck/main.c b/fsck/main.c
index 9d9cc0c..ba247d4 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -113,7 +113,15 @@ void f2fs_parse_options(int argc, char *argv[])
        int option = 0;
        char *prog = basename(argv[0]);
        int err = NOERROR;
+#ifdef WITH_ANDROID
+       int i;
 
+       /* Allow prog names (e.g, sload_f2fs, fsck_f2fs, etc) */
+       for (i = 0; i < strlen(prog); i++) {
+               if (prog[i] == '_')
+                       prog[i] = '.';
+       }
+#endif
        if (argc < 2) {
                MSG(0, "\tError: Device not specified\n");
                error_out(prog);
-- 
2.15.0.403.gc27cc4dac6-goog


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to