diff options
author | obrien <obrien@FreeBSD.org> | 2008-05-11 17:23:57 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2008-05-11 17:23:57 +0000 |
commit | 10234848d588839bb6f9394d46a919e69976127d (patch) | |
tree | 8c8200b7f830b36ffbbd83595322269253cb9daf /usr.sbin/sysinstall | |
parent | d92d788e4d139d301688ce33cbc123d2f7ed68b0 (diff) | |
download | FreeBSD-src-10234848d588839bb6f9394d46a919e69976127d.zip FreeBSD-src-10234848d588839bb6f9394d46a919e69976127d.tar.gz |
Better to just statically set the name vs. determine at run time.
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r-- | usr.sbin/sysinstall/config.c | 2 | ||||
-rw-r--r-- | usr.sbin/sysinstall/label.c | 2 | ||||
-rw-r--r-- | usr.sbin/sysinstall/main.c | 1 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 1 | ||||
-rw-r--r-- | usr.sbin/sysinstall/system.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/variable.c | 4 |
6 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index b101149..bb7ffbc 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -188,7 +188,7 @@ configFstab(dialogMenuItem *self) else { msgConfirm("Attempting to rebuild your /etc/fstab file. Warning: If you had\n" "any CD devices in use before running %s then they may NOT\n" - "be found by this run!", StartName); + "be found by this run!", ProgName); } } diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c index 3119515..a60c8dc 100644 --- a/usr.sbin/sysinstall/label.c +++ b/usr.sbin/sysinstall/label.c @@ -1281,7 +1281,7 @@ diskLabel(Device *dev) if (!variable_cmp(DISK_LABELLED, "written")) { msgConfirm("You've already written out your changes - if you\n" "wish to overwrite them, you'll have to restart\n" - "%s first.", StartName); + "%s first.", ProgName); } else if (!msgNoYes("WARNING: This should only be used when modifying an EXISTING\n" "installation. If you are installing FreeBSD for the first time\n" diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c index dc02902..abea76c 100644 --- a/usr.sbin/sysinstall/main.c +++ b/usr.sbin/sysinstall/main.c @@ -41,6 +41,7 @@ #include <sys/resource.h> const char *StartName; /* Initial contents of argv[0] */ +const char *ProgName = "sysinstall"; static void screech(int sig) diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index 64ee7a7..2805c87 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -479,6 +479,7 @@ extern DMenu MenuUsermgmt; /* User management menu */ extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */ extern int FixItMode; /* FixItMode starts shell on current device (ie Serial port) */ extern const char * StartName; /* Which name we were started as */ +extern const char * ProgName; /* Program's proper name */ extern int NCpus; /* # cpus on machine */ /* Important chunks. */ diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index ad5ab20..a5d8aa9 100644 --- a/usr.sbin/sysinstall/system.c +++ b/usr.sbin/sysinstall/system.c @@ -365,11 +365,11 @@ systemHelpFile(char *file, char *buf) snprintf(buf, FILENAME_MAX, "/stand/help/%s.TXT", file); if (file_readable(buf)) return expand(buf); - snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.hlp", StartName, + snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.hlp", ProgName, file); if (file_readable(buf)) return buf; - snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.TXT", StartName, + snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.TXT", ProgName, file); if (file_readable(buf)) return buf; diff --git a/usr.sbin/sysinstall/variable.c b/usr.sbin/sysinstall/variable.c index ba6ca9f..3bc6aa7 100644 --- a/usr.sbin/sysinstall/variable.c +++ b/usr.sbin/sysinstall/variable.c @@ -243,12 +243,12 @@ dump_variables(dialogMenuItem *unused) Variable *vp; if (isDebug()) - msgDebug("Writing %s variables to file..\n", StartName); + msgDebug("Writing %s variables to file..\n", ProgName); fp = fopen("/etc/sysinstall.vars", "w"); if (!fp) { msgConfirm("Unable to write to /etc/%s.vars: %s", - StartName, strerror(errno)); + ProgName, strerror(errno)); return DITEM_FAILURE; } |