diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-17 23:47:36 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-17 23:47:36 +0200 |
commit | 69d9edc6f8387ed0ec4742a5de895b22b3910818 (patch) | |
tree | 6f6fee66f3c2bc8a45847e9e6a00b7141364885a /util-linux/mkfs_ext2.c | |
parent | 6a8cfdca9953fc8824a57a85e11f156da59e841d (diff) | |
download | busybox-w32-69d9edc6f8387ed0ec4742a5de895b22b3910818.tar.gz busybox-w32-69d9edc6f8387ed0ec4742a5de895b22b3910818.tar.bz2 busybox-w32-69d9edc6f8387ed0ec4742a5de895b22b3910818.zip |
mkfs_ext2: code shrink
function old new delta
mkfs_ext2_main 1933 1924 -9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/mkfs_ext2.c')
-rw-r--r-- | util-linux/mkfs_ext2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 83e81054b..6b059d9ff 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c | |||
@@ -275,9 +275,7 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv) | |||
275 | * don't check all the filesystems at the same time. We use a | 275 | * don't check all the filesystems at the same time. We use a |
276 | * kludgy hack of using the UUID to derive a random jitter value. | 276 | * kludgy hack of using the UUID to derive a random jitter value. |
277 | */ | 277 | */ |
278 | for (i = 0, n = 0; i < sizeof(sb->s_uuid); i++) | 278 | sb->s_max_mnt_count += sb->s_uuid[ARRAY_SIZE(sb->s_uuid)-1] % EXT2_DFL_MAX_MNT_COUNT; |
279 | n += sb->s_uuid[i]; | ||
280 | sb->s_max_mnt_count += n % EXT2_DFL_MAX_MNT_COUNT; | ||
281 | 279 | ||
282 | // open the device, get number of blocks | 280 | // open the device, get number of blocks |
283 | xmove_fd(xopen3(argv[0], O_WRONLY | O_CREAT, 0666), fd); | 281 | xmove_fd(xopen3(argv[0], O_WRONLY | O_CREAT, 0666), fd); |