hi --
one of our team found this while experimenting with a very large
swap file. the symptom is that the file is rejected as having
holes, when it does not (because the size goes negative). he did
this some time ago, and i haven't tried to reproduce it since,
but the fix looks correct, and moreover, benign.
i'll commit in a day or two if there are no objections.
paul
diff -u -r1.1 swaponoff.c
--- util-linux/swaponoff.c 5 Nov 2007 13:45:41 -0000 1.1
+++ util-linux/swaponoff.c 5 Nov 2007 16:52:38 -0000
@@ -21,7 +21,7 @@
#if ENABLE_DESKTOP
/* test for holes */
if (S_ISREG(st.st_mode))
- if (st.st_blocks * 512 < st.st_size)
+ if (st.st_blocks * 512u < st.st_size)
bb_error_msg("warning: swap file has holes");
#endif
=---------------------
paul fox, [EMAIL PROTECTED]
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox