diff options
author | Eric Andersen <andersen@codepoet.org> | 1999-12-05 23:24:55 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 1999-12-05 23:24:55 +0000 |
commit | 0ecb54a0f3fece5e42f089036f059973bed8d87e (patch) | |
tree | e25c3d29c9c92fed488e03459b2aee558b1a8d25 /utility.c | |
parent | 14ec6cf3c224d53219b2713b0040dfa03314d5b3 (diff) |
Stuf
Diffstat (limited to 'utility.c')
-rw-r--r-- | utility.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -36,12 +36,16 @@ #include <unistd.h> #include <ctype.h> -#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) { <stuff> } |