diff options
author | Denis Vlasenko | 2008-02-12 17:12:28 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-02-12 17:12:28 +0000 |
commit | a68cb75a2e72303ef4a609cab28d25ccc789d685 (patch) | |
tree | c9f1fd8ef0c1d50341c4377ce467c94ec6944881 /util-linux | |
parent | 0b18cd3d04b17acec73af3d2cafd00c59a3f807f (diff) | |
download | busybox-a68cb75a2e72303ef4a609cab28d25ccc789d685.zip busybox-a68cb75a2e72303ef4a609cab28d25ccc789d685.tar.gz |
Applied post 1.9.0 fixes
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/mkswap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index 8e1fbc3..f14f6df 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c @@ -64,9 +64,10 @@ int mkswap_main(int argc, char **argv) // Figure out how big the device is and announce our intentions. fd = xopen(argv[1], O_RDWR); - len = fdlength(fd); + len = lseek(fd, 0, SEEK_END); + lseek(fd, 0, SEEK_SET); pagesize = getpagesize(); - printf("Setting up swapspace version 1, size = %"OFF_FMT"d bytes\n", + printf("Setting up swapspace version 1, size = %"OFF_FMT"u bytes\n", len - pagesize); mkswap_selinux_setcontext(fd, argv[1]); |