OSDN Git Service

Return non-zero code from fsck if errors were found.
authorresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Sun, 10 Jan 2010 08:34:44 +0000 (08:34 +0000)
committerresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Sun, 10 Jan 2010 08:34:44 +0000 (08:34 +0000)
git-svn-id: http://exfat.googlecode.com/svn/trunk@108 60bc1c72-a15a-11de-b98f-4500b42dc123

fsck/main.c

index dba207a..8964911 100644 (file)
@@ -152,11 +152,12 @@ int main(int argc, char* argv[])
        printf("Totally %"PRIu64" directories and %"PRIu64" files.\n",
                        directories_count, files_count);
 
-       fputs("File system checking finished: ", stdout);
-       if (exfat_errors == 0)
-               puts("seems OK.");
-       else
-               printf("%d ERROR%s FOUND!!!\n", exfat_errors,
-                               exfat_errors > 1 ? "S WERE" : " WAS");
+       fputs("File system checking finished. ", stdout);
+       if (exfat_errors != 0)
+       {
+               printf("ERRORS FOUND: %d.\n", exfat_errors);
+               return 1;
+       }
+       puts("No errors found.");
        return 0;
 }