diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-10-31 02:04:18 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-10-31 02:04:18 +0000 |
commit | e64bf409dd07d818d16b48bcee4a285b1dc81f4f (patch) | |
tree | f5527bcd3c27f7d42798909773d6fdb5cea0a50c /util-linux/mkswap.c | |
parent | 4ef5a84583488942142d1adf9bdc46cb44ba0626 (diff) | |
download | busybox-w32-e64bf409dd07d818d16b48bcee4a285b1dc81f4f.tar.gz busybox-w32-e64bf409dd07d818d16b48bcee4a285b1dc81f4f.tar.bz2 busybox-w32-e64bf409dd07d818d16b48bcee4a285b1dc81f4f.zip |
Patch from David Meggy to make the swap default to the new version if no
version is specified and the kernel is relatively new.
Diffstat (limited to 'util-linux/mkswap.c')
-rw-r--r-- | util-linux/mkswap.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index 30a364ced..1fc648f3a 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c | |||
@@ -320,11 +320,7 @@ int mkswap_main(int argc, char **argv) | |||
320 | } | 320 | } |
321 | 321 | ||
322 | if (version == -1) { | 322 | if (version == -1) { |
323 | if (PAGES <= V0_MAX_PAGES) | 323 | if (get_kernel_revision() < MAKE_VERSION(2, 1, 117)) |
324 | version = 0; | ||
325 | else if (get_kernel_revision() < MAKE_VERSION(2, 1, 117)) | ||
326 | version = 0; | ||
327 | else if (pagesize < 2048) | ||
328 | version = 0; | 324 | version = 0; |
329 | else | 325 | else |
330 | version = 1; | 326 | version = 1; |