diff options
author | Theodore Ts'o <tytso@mit.edu> | 2006-03-23 22:37:02 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2006-03-23 22:37:02 -0500 |
commit | fcadc8c84cf0a390ab8a41ff620bb31630b5e0a9 (patch) | |
tree | abd87ff6e9ead6e6cd349f354fdd6f18725fad48 /misc/mklost+found.c | |
parent | 2858c94e35909c9edcc434acc1b83746143e704e (diff) | |
download | e2fsprogs-fcadc8c84cf0a390ab8a41ff620bb31630b5e0a9.tar.gz |
mklost+found: Create full-sized a lost+found directory with 4k+ blocksizes
Fixed a bug caused by using an insufficiently larger counter field so
that mklost+found would work properly on filesystems with larger block
sizes.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc/mklost+found.c')
-rw-r--r-- | misc/mklost+found.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/mklost+found.c b/misc/mklost+found.c index 027c8995..a0e71f00 100644 --- a/misc/mklost+found.c +++ b/misc/mklost+found.c @@ -55,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); @@ -73,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); |