mkswap: do not do extra seek

mount: add another mount helper call method
This commit is contained in:
Denis Vlasenko
2008-02-03 23:52:41 +00:00
parent c85bfcad52
commit 32d49bc70f
3 changed files with 28 additions and 3 deletions

View File

@@ -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);