Move applet_name declaration from busybox.h to libbb.h.
authorMatt Kraai <kraai@debian.org>
Tue, 24 Apr 2001 01:12:33 +0000 (01:12 -0000)
committerMatt Kraai <kraai@debian.org>
Tue, 24 Apr 2001 01:12:33 +0000 (01:12 -0000)
busybox.h
include/busybox.h
include/libbb.h
libbb/copy_file.c
libbb/libbb.h
libbb/syslog_msg_with_name.c
libbb/verror_msg.c

index 8905b0dbd22891485ce6d5cae8144ca03ac34ad0..e8055b06c0545b5b996b33d6f83cb2281b9bc637 100644 (file)
--- a/busybox.h
+++ b/busybox.h
@@ -66,8 +66,6 @@ extern const struct BB_applet applets[];
 #include "applets.h"
 #undef PROTOTYPES
 
-extern const char *applet_name;
-
 #ifdef BB_FEATURE_BUFFERS_GO_ON_STACK
 #define RESERVE_BB_BUFFER(buffer,len)           char buffer[len]
 #define RESERVE_BB_UBUFFER(buffer,len) unsigned char buffer[len]
index 8905b0dbd22891485ce6d5cae8144ca03ac34ad0..e8055b06c0545b5b996b33d6f83cb2281b9bc637 100644 (file)
@@ -66,8 +66,6 @@ extern const struct BB_applet applets[];
 #include "applets.h"
 #undef PROTOTYPES
 
-extern const char *applet_name;
-
 #ifdef BB_FEATURE_BUFFERS_GO_ON_STACK
 #define RESERVE_BB_BUFFER(buffer,len)           char buffer[len]
 #define RESERVE_BB_UBUFFER(buffer,len) unsigned char buffer[len]
index c47a6689e241795c7515cd1f9d0a3568026d4d1e..4eeb99343ccc08ef4822532a344db02d8737eb56 100644 (file)
@@ -262,4 +262,6 @@ enum {
        CP_INTERACTIVE = 16
 };
 
+extern const char *applet_name;
+
 #endif /* __LIBBB_H__ */
index 113c253b9e4d68dc85bffa4728daffb56ba9ff6f..f24d1b119955bfa98dd0f996755f3af734da5974 100644 (file)
@@ -126,7 +126,7 @@ int copy_file(const char *source, const char *dest, int flags)
 
                if (dest_exists) {
                        if (flags & CP_INTERACTIVE) {
-                               fprintf(stderr, "cp: overwrite `%s'? ", dest);
+                               fprintf(stderr, "%s: overwrite `%s'? ", applet_name, dest);
                                if (!ask_confirmation())
                                        return 0;
                        }
index c47a6689e241795c7515cd1f9d0a3568026d4d1e..4eeb99343ccc08ef4822532a344db02d8737eb56 100644 (file)
@@ -262,4 +262,6 @@ enum {
        CP_INTERACTIVE = 16
 };
 
+extern const char *applet_name;
+
 #endif /* __LIBBB_H__ */
index d72755a37a9cc9f0f32b0b3a060ee34af1fecb51..5dadcc4335fabfb79eae4fe77a9796d4d46045c4 100644 (file)
@@ -29,8 +29,6 @@
 #include <sys/syslog.h>
 #include "libbb.h"
 
-extern const char *applet_name;
-
 void syslog_msg_with_name(const char *name, int facility, int pri, const char *msg)
 {
        openlog(name, 0, facility);
index b5278cfb7acac7712186c7c5c79976cf1dd49938..b34821561566d57f58a962371f8c5a931c3c5c34 100644 (file)
@@ -31,8 +31,6 @@
 #include <stdlib.h>
 #include "libbb.h"
 
-extern const char *applet_name;
-
 extern void verror_msg(const char *s, va_list p)
 {
        fflush(stdout);