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/sade | |
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/sade')
-rw-r--r-- | usr.sbin/sade/config.c | 2 | ||||
-rw-r--r-- | usr.sbin/sade/label.c | 2 | ||||
-rw-r--r-- | usr.sbin/sade/main.c | 1 | ||||
-rw-r--r-- | usr.sbin/sade/sade.h | 1 | ||||
-rw-r--r-- | usr.sbin/sade/system.c | 4 | ||||
-rw-r--r-- | usr.sbin/sade/variable.c | 4 |
6 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index b4f755f..c8b0fc8 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -182,7 +182,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); } devs = deviceFind(NULL, DEVICE_TYPE_DISK); diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index 6b7c774..3f20450 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -1276,7 +1276,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: You are about to modify an EXISTING\n" "installation.\n\n" diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c index 5496e13..22d9401 100644 --- a/usr.sbin/sade/main.c +++ b/usr.sbin/sade/main.c @@ -34,6 +34,7 @@ #include <sys/fcntl.h> const char *StartName; /* Initial contents of argv[0] */ +const char *ProgName = "sade"; int main(int argc, char **argv) diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index 66ba396..4bf7e1b 100644 --- a/usr.sbin/sade/sade.h +++ b/usr.sbin/sade/sade.h @@ -278,6 +278,7 @@ extern DMenu MenuMBRType; /* Type of MBR to write on the disk */ extern DMenu MenuMain; /* New main menu */ extern DMenu MenuDiskDevices; /* Disk type devices */ extern const char * StartName; /* Which name we were started as */ +extern const char * ProgName; /* Program's proper name */ /* Important chunks. */ extern Chunk *HomeChunk; diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index 05e55ec..149bbeb 100644 --- a/usr.sbin/sade/system.c +++ b/usr.sbin/sade/system.c @@ -233,11 +233,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/sade/variable.c b/usr.sbin/sade/variable.c index 9abbcf4..911eb02 100644 --- a/usr.sbin/sade/variable.c +++ b/usr.sbin/sade/variable.c @@ -238,12 +238,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/sade.vars", "w"); if (!fp) { msgConfirm("Unable to write to /etc/%s.vars: %s", - StartName, strerror(errno)); + ProgName, strerror(errno)); return DITEM_FAILURE; } |