From 0ecb54a0f3fece5e42f089036f059973bed8d87e Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 5 Dec 1999 23:24:55 +0000 Subject: Stuf --- utility.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'utility.c') diff --git a/utility.c b/utility.c index a38ef86..81bff18 100644 --- a/utility.c +++ b/utility.c @@ -36,12 +36,16 @@ #include #include -#ifdef BB_MTAB -const char mtab_file[] = "/etc/mtab"; -#else #if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF +# if defined BB_FEATURE_USE_PROCFS const char mtab_file[] = "/proc/mounts"; -#endif +# else +# if defined BB_MTAB +const char mtab_file[] = "/etc/mtab"; +# else +# error With (BB_MOUNT||BB_UMOUNT||BB_DF) defined, you must define either BB_MTAB or BB_FEATURE_USE_PROCFS +# endif +# endif #endif @@ -56,6 +60,9 @@ extern void usage(const char *usage) #if defined (BB_INIT) || defined (BB_PS) +#if ! defined BB_FEATURE_USE_PROCFS +#error Sorry, I depend on the /proc filesystem right now. +#endif /* Returns kernel version encoded as major*65536 + minor*256 + patch, * so, for example, to check if the kernel is greater than 2.2.11: * if (get_kernel_revision() <= 2*65536+2*256+11) { } -- cgit v1.1