[BusyBox] mkswap

David Meggy dmeggy at techsol.ca
Fri Oct 31 01:35:42 UTC 2003


This patch makes the default swap version 1, unless an old kernel is
being used.  I did this since linux 2.6 won't support the old version.


diff -urN busybox-1.00-pre3.orig/util-linux/mkswap.c busybox-1.00-pre3/util-linux/mkswap.c
--- busybox-1.00-pre3.orig/util-linux/mkswap.c	Mon Jul 14 14:21:07 2003
+++ busybox-1.00-pre3/util-linux/mkswap.c	Thu Oct 30 17:08:36 2003
@@ -320,11 +320,7 @@
 	}
 
 	if (version == -1) {
-		if (PAGES <= V0_MAX_PAGES)
-			version = 0;
-		else if (get_kernel_revision() < MAKE_VERSION(2, 1, 117))
-			version = 0;
-		else if (pagesize < 2048)
+		if (get_kernel_revision() < MAKE_VERSION(2, 1, 117))
 			version = 0;
 		else
 			version = 1;




-- 
~~~~~~~~~~~~~~~~~~~~~~~~
     David Meggy
     Engineering

Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
     www.techsol.ca

eMail: dmeggy at techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~




More information about the busybox mailing list