mirror of
https://github.com/sheumann/hush.git
synced 2025-01-18 23:29:48 +00:00
mkfs_ext2: code shrink
function old new delta mkfs_ext2_main 1933 1924 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
6a8cfdca99
commit
69d9edc6f8
@ -275,9 +275,7 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
* don't check all the filesystems at the same time. We use a
|
* don't check all the filesystems at the same time. We use a
|
||||||
* kludgy hack of using the UUID to derive a random jitter value.
|
* kludgy hack of using the UUID to derive a random jitter value.
|
||||||
*/
|
*/
|
||||||
for (i = 0, n = 0; i < sizeof(sb->s_uuid); i++)
|
sb->s_max_mnt_count += sb->s_uuid[ARRAY_SIZE(sb->s_uuid)-1] % EXT2_DFL_MAX_MNT_COUNT;
|
||||||
n += sb->s_uuid[i];
|
|
||||||
sb->s_max_mnt_count += n % EXT2_DFL_MAX_MNT_COUNT;
|
|
||||||
|
|
||||||
// open the device, get number of blocks
|
// open the device, get number of blocks
|
||||||
xmove_fd(xopen3(argv[0], O_WRONLY | O_CREAT, 0666), fd);
|
xmove_fd(xopen3(argv[0], O_WRONLY | O_CREAT, 0666), fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user