diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-19 11:54:02 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-19 11:54:02 +0000 |
commit | e2e56c7c4129de7d20df42e8239fd304c81ef29b (patch) | |
tree | 0f9eb8281fac2f87c79a888dac49b27a1965b366 /util-linux/mkswap.c | |
parent | e3c150bc67cb158ee854ffb498f0066c79cd842c (diff) |
- single KERNEL_VERSION(a,b,c) macro in platform.h
- rename get_kernel_revision() to get_linux_version_code
from Robert P. J. Day
Diffstat (limited to 'util-linux/mkswap.c')
-rw-r--r-- | util-linux/mkswap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index 44d809a36..0054eca24 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c @@ -61,14 +61,14 @@ static int check = 0; static int badpages = 0; #if ENABLE_FEATURE_MKSWAP_V0 static int version = -1; -#define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r)) #else #define version 1 /* and make sure that we optimize away anything which would deal with checking * the kernel revision as we have v1 support only anyway. */ -#define MAKE_VERSION(p,q,r) 1 -#define get_kernel_revision() 1 +#undef KERNEL_VERSION +#define KERNEL_VERSION(p,q,r) 1 +#define get_linux_version_code() 1 #endif /* @@ -293,7 +293,7 @@ int mkswap_main(int argc, char **argv) if (sz & 4) { version = bb_xgetlarg(tmp, 10, 0, 1); } else { - if (get_kernel_revision() < MAKE_VERSION(2, 1, 117)) + if (get_linux_version_code() < KERNEL_VERSION(2, 1, 117)) version = 0; else version = 1; @@ -327,7 +327,7 @@ int mkswap_main(int argc, char **argv) #else if (!version) maxpages = V0_MAX_PAGES; - else if (get_kernel_revision() >= MAKE_VERSION(2, 2, 1)) + else if (get_linux_version_code() >= KERNEL_VERSION(2,2,1)) maxpages = V1_MAX_PAGES; else { maxpages = V1_OLD_MAX_PAGES; |