Whamcloud - gitweb
Enable e2fsck to use the tdb library to store the dirinfo abstraction
[tools/e2fsprogs.git] / misc / mklost+found.c
index fa77930..a0e71f0 100644 (file)
@@ -45,6 +45,7 @@ int main (int argc, char ** argv)
        fprintf (stderr, "mklost+found %s (%s)\n", E2FSPROGS_VERSION,
                 E2FSPROGS_DATE);
        if (argc != 1) {
+               (void)argv; /* avoid unused argument warning */
                fprintf (stderr, _("Usage: mklost+found\n"));
                exit(1);
        }
@@ -54,9 +55,9 @@ int main (int argc, char ** argv)
        }
        
        i = 0;
-       memset (name, 'x', 252);
+       memset (name, 'x', 246);
        do {
-               sprintf (name + 252, "%02d", i);
+               sprintf (name + 246, "%08d", i);
                strcpy (path, LPF);
                strcat (path, "/");
                strcat (path, name);
@@ -72,7 +73,7 @@ int main (int argc, char ** argv)
                }
        } while (st.st_size <= (EXT2_NDIR_BLOCKS - 1) * st.st_blksize);
        for (j = 0; j < i; j++) {
-               sprintf (name + 252, "%02d", j);
+               sprintf (name + 246, "%08d", j);
                strcpy (path, LPF);
                strcat (path, "/");
                strcat (path, name);