aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mkswap.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-03 23:52:41 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-03 23:52:41 +0000
commit32d49bc70fa544c45421ae475b38b412e610e278 (patch)
tree964eb7c919ac3712f0a072bf2adbb70d1ca6f22d /util-linux/mkswap.c
parentc85bfcad5206598e7a1dc82c2144f3129518f7d6 (diff)
downloadbusybox-w32-32d49bc70fa544c45421ae475b38b412e610e278.tar.gz
busybox-w32-32d49bc70fa544c45421ae475b38b412e610e278.tar.bz2
busybox-w32-32d49bc70fa544c45421ae475b38b412e610e278.zip
mkswap: do not do extra seek
mount: add another mount helper call method
Diffstat (limited to 'util-linux/mkswap.c')
-rw-r--r--util-linux/mkswap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index f047cce26..31d577315 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -66,7 +66,9 @@ int mkswap_main(int argc, char **argv)
66 fd = xopen(argv[1], O_RDWR); 66 fd = xopen(argv[1], O_RDWR);
67 /* fdlength was reported to be unreliable - use seek */ 67 /* fdlength was reported to be unreliable - use seek */
68 len = xlseek(fd, 0, SEEK_END); 68 len = xlseek(fd, 0, SEEK_END);
69#if ENABLE_SELINUX
69 xlseek(fd, 0, SEEK_SET); 70 xlseek(fd, 0, SEEK_SET);
71#endif
70 pagesize = getpagesize(); 72 pagesize = getpagesize();
71 printf("Setting up swapspace version 1, size = %"OFF_FMT"u bytes\n", 73 printf("Setting up swapspace version 1, size = %"OFF_FMT"u bytes\n",
72 len - pagesize); 74 len - pagesize);