aboutsummaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/utility.c b/utility.c
index 69403c8c2..f99c613a1 100644
--- a/utility.c
+++ b/utility.c
@@ -63,26 +63,16 @@
63 63
64/* Busybox mount uses either /proc/filesystems or /dev/mtab to get the 64/* Busybox mount uses either /proc/filesystems or /dev/mtab to get the
65 * list of available filesystems used for the -t auto option */ 65 * list of available filesystems used for the -t auto option */
66#if defined BB_FEATURE_USE_PROCFS && defined BB_FEATURE_USE_DEVPS_PATCH
67//#error Sorry, but busybox can't use both /proc and /dev/ps at the same time -- Pick one and try again.
68#error "Sorry, but busybox can't use both /proc and /dev/ps at the same time -- Pick one and try again."
69#endif
70
71
72#if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF 66#if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF
73# if defined BB_MTAB 67# if defined BB_MTAB
74const char mtab_file[] = "/etc/mtab"; 68const char mtab_file[] = "/etc/mtab";
75# else 69# else
76# if defined BB_FEATURE_USE_PROCFS
77const char mtab_file[] = "/proc/mounts";
78# else
79# if defined BB_FEATURE_USE_DEVPS_PATCH 70# if defined BB_FEATURE_USE_DEVPS_PATCH
80const char mtab_file[] = "/dev/mtab"; 71const char mtab_file[] = "/dev/mtab";
81# else 72# else
82# error With (BB_MOUNT||BB_UMOUNT||BB_DF) defined, you must define either BB_MTAB or ( BB_FEATURE_USE_PROCFS | BB_FEATURE_USE_DEVPS_PATCH) 73const char mtab_file[] = "/proc/mounts";
83# endif 74# endif
84# endif 75# endif
85# endif
86#endif 76#endif
87 77
88extern void usage(const char *usage) 78extern void usage(const char *usage)
@@ -1271,9 +1261,6 @@ extern pid_t* find_pid_by_name( char* pidName)
1271 return pidList; 1261 return pidList;
1272} 1262}
1273#else /* BB_FEATURE_USE_DEVPS_PATCH */ 1263#else /* BB_FEATURE_USE_DEVPS_PATCH */
1274#if ! defined BB_FEATURE_USE_PROCFS
1275#error Sorry, I depend on the /proc filesystem right now.
1276#endif
1277 1264
1278/* find_pid_by_name() 1265/* find_pid_by_name()
1279 * 1266 *
@@ -1634,7 +1621,7 @@ char process_escape_sequence(char **ptr)
1634#endif 1621#endif
1635 1622
1636#if defined BB_BASENAME || defined BB_LN || defined BB_SH || defined BB_INIT || \ 1623#if defined BB_BASENAME || defined BB_LN || defined BB_SH || defined BB_INIT || \
1637 defined BB_FEATURE_USE_PROCFS || defined BB_WGET 1624 ! defined BB_FEATURE_USE_DEVPS_PATCH || defined BB_WGET
1638char *get_last_path_component(char *path) 1625char *get_last_path_component(char *path)
1639{ 1626{
1640 char *s=path+strlen(path)-1; 1627 char *s=path+strlen(path)-1;
@@ -1681,7 +1668,8 @@ FILE *wfopen(const char *path, const char *mode)
1681 1668
1682#if defined BB_HOSTNAME || defined BB_LOADACM || defined BB_MORE \ 1669#if defined BB_HOSTNAME || defined BB_LOADACM || defined BB_MORE \
1683 || defined BB_SED || defined BB_SH || defined BB_TAR || defined BB_UNIQ \ 1670 || defined BB_SED || defined BB_SH || defined BB_TAR || defined BB_UNIQ \
1684 || defined BB_WC || defined BB_CMP || defined BB_SORT || defined BB_WGET 1671 || defined BB_WC || defined BB_CMP || defined BB_SORT || defined BB_WGET \
1672 || defined BB_MOUNT
1685FILE *xfopen(const char *path, const char *mode) 1673FILE *xfopen(const char *path, const char *mode)
1686{ 1674{
1687 FILE *fp; 1675 FILE *fp;