Credited Christophe Boyaniqu for interactive patch to rm.
[oweals/busybox.git] / busybox.h
index 99932095bd609735616711e78d2c744bac57e0f1..7ae64850190b96599ef7d6b591120647732ec50a 100644 (file)
--- a/busybox.h
+++ b/busybox.h
@@ -151,6 +151,7 @@ extern char *get_last_path_component(char *path);
 extern FILE *wfopen(const char *path, const char *mode);
 extern FILE *xfopen(const char *path, const char *mode);
 extern void chomp(char *s);
+extern void trim(char *s);
 extern struct BB_applet *find_applet_by_name(const char *name);
 void run_applet_by_name(const char *name, int argc, char **argv);
 
@@ -204,6 +205,11 @@ int nfsmount(const char *spec, const char *node, int *flags,
 #define RB_POWER_OFF   0x4321fedc
 #endif
 
+#if defined(BB_KLOGD) || defined(BB_LOGGER)
+void syslog_msg_with_name(const char *name, int facility, int pri, const char *msg);
+void syslog_msg(int facility, int pri, const char *msg);
+#endif
+
 /* Include our own copy of struct sysinfo to avoid binary compatability
  * problems with Linux 2.4, which changed things.  Grumble, grumble. */
 struct sysinfo {
@@ -233,11 +239,13 @@ extern int sysinfo (struct sysinfo* info);
 #endif
 
 #ifdef BB_FEATURE_HUMAN_READABLE
-const char *format(unsigned long val, unsigned long hr);
+const char *make_human_readable_str(unsigned long val, unsigned long hr);
 #endif
-#define KILOBYTE 1024
-#define MEGABYTE (KILOBYTE*1024)
-#define GIGABYTE (MEGABYTE*1024)
+enum {
+       KILOBYTE = 1024,
+       MEGABYTE = (KILOBYTE*1024),
+       GIGABYTE = (MEGABYTE*1024)
+};
 
 #ifdef BB_FEATURE_BUFFERS_GO_ON_STACK
 #define RESERVE_BB_BUFFER(buffer,len)           char buffer[len]
@@ -247,4 +255,8 @@ const char *format(unsigned long val, unsigned long hr);
 #define RESERVE_BB_UBUFFER(buffer,len) unsigned char *buffer=xmalloc(len)
 #endif
 
+#if defined(BB_FEATURE_RM_INTERACTIVE) && defined(BB_RM)
+int ask_confirmation(void);
+#endif
+
 #endif /* _BB_INTERNAL_H_ */