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-32d49bc70fa544c45421ae475b38b412e610e278.tar.gz
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)
fd = xopen(argv[1], O_RDWR);
/* fdlength was reported to be unreliable - use seek */
len = xlseek(fd, 0, SEEK_END);
+#if ENABLE_SELINUX
xlseek(fd, 0, SEEK_SET);
+#endif
pagesize = getpagesize();
printf("Setting up swapspace version 1, size = %"OFF_FMT"u bytes\n",
len - pagesize);