summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko2008-02-12 17:12:28 +0000
committerDenis Vlasenko2008-02-12 17:12:28 +0000
commita68cb75a2e72303ef4a609cab28d25ccc789d685 (patch)
treec9f1fd8ef0c1d50341c4377ce467c94ec6944881 /util-linux
parent0b18cd3d04b17acec73af3d2cafd00c59a3f807f (diff)
downloadbusybox-a68cb75a2e72303ef4a609cab28d25ccc789d685.zip
busybox-a68cb75a2e72303ef4a609cab28d25ccc789d685.tar.gz
Applied post 1.9.0 fixes
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mkswap.c5
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]);