summaryrefslogtreecommitdiffstats
path: root/package/busybox/busybox-1.9.0-mkswap.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/busybox/busybox-1.9.0-mkswap.patch')
-rw-r--r--package/busybox/busybox-1.9.0-mkswap.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.9.0-mkswap.patch b/package/busybox/busybox-1.9.0-mkswap.patch
new file mode 100644
index 000000000..ac7e1ecc5
--- /dev/null
+++ b/package/busybox/busybox-1.9.0-mkswap.patch
@@ -0,0 +1,15 @@
+--- busybox-1.9.0/util-linux/mkswap.c Fri Dec 21 22:00:33 2007
++++ busybox-1.9.0-mkswap/util-linux/mkswap.c Sat Feb 2 18:55:31 2008
+@@ -64,9 +64,10 @@
+ // 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]);
+