Just use the extern applet var.

This commit is contained in:
Roy Marples 2008-02-11 20:14:09 +00:00
parent 5e470afb52
commit 567f8e33f2
7 changed files with 7 additions and 16 deletions

View File

@ -46,7 +46,7 @@
#include "einfo.h"
#include "rc-misc.h"
static const char *applet;
extern const char *applet;
static int do_check (char *path, uid_t uid, gid_t gid, mode_t mode, int file)
{
@ -188,8 +188,6 @@ int checkpath (int argc, char **argv)
bool file = 0;
int retval = EXIT_SUCCESS;
applet = basename_c (argv[0]);
while ((opt = getopt_long (argc, argv, getoptstring,
longopts, (int *) 0)) != -1)
{

View File

@ -86,7 +86,7 @@ static struct mntent *getmntfile (const char *file)
}
#endif
static const char *applet = NULL;
extern const char *applet;
#include "_usage.h"
#define getoptstring "bmop:t:" getoptstring_COMMON
@ -128,8 +128,6 @@ int fstabinfo (int argc, char **argv)
char *file;
bool filtered = false;
applet = basename_c (argv[0]);
/* Ensure that we are only quiet when explicitly told to be */
unsetenv ("EINFO_QUIET");

View File

@ -58,7 +58,7 @@
#include "rc-misc.h"
#include "strlist.h"
static const char *applet;
extern const char *applet;
typedef enum {
mount_from,

View File

@ -45,7 +45,7 @@
#include "rc-misc.h"
#include "strlist.h"
static const char *applet;
extern const char *applet;
rc_depinfo_t *_rc_deptree_load (int *regen) {
if (rc_deptree_update_needed ()) {
@ -96,8 +96,6 @@ int rc_depend (int argc, char **argv)
int opt;
char *token;
applet = basename_c (argv[0]);
while ((opt = getopt_long (argc, argv, getoptstring,
longopts, (int *) 0)) != -1)
{

View File

@ -41,7 +41,7 @@
#include "rc-misc.h"
#include "strlist.h"
static const char *applet;
extern const char *applet;
static const char *const types_nua[] = { "ineed", "iuse", "iafter", NULL };

View File

@ -44,7 +44,7 @@
#include "rc-misc.h"
#include "strlist.h"
static const char *applet = NULL;
extern const char *applet;
/* Return the number of changes made:
* -1 = no changes (error)
@ -157,8 +157,6 @@ int rc_update (int argc, char **argv)
int opt;
int retval = EXIT_FAILURE;
applet = basename_c (argv[0]);
while ((opt = getopt_long (argc, argv, getoptstring,
longopts, (int *) 0)) != -1)
{

View File

@ -88,7 +88,7 @@ typedef struct schedulelist
} schedulelist_t;
static schedulelist_t *schedule;
static const char *applet;
extern const char *applet;
static char *changeuser;
static char **newenv;
@ -575,7 +575,6 @@ int start_stop_daemon (int argc, char **argv)
char *svcname = getenv ("SVCNAME");
char *env;
applet = basename_c (argv[0]);
atexit (cleanup);
signal_setup (SIGINT, handle_signal);