diff options
author | simon <simon@FreeBSD.org> | 2006-07-15 12:23:56 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2006-07-15 12:23:56 +0000 |
commit | 0eacf9737caf2565dd819b5b0335a07ac729f328 (patch) | |
tree | fc1eb3e89eb516ab8f6f2bc2181f7c4f2cd8b19c /usr.sbin/sysinstall/install.c | |
parent | 8f169c00cb7fabb05b0febab6c26286eddd3da1a (diff) | |
download | FreeBSD-src-0eacf9737caf2565dd819b5b0335a07ac729f328.zip FreeBSD-src-0eacf9737caf2565dd819b5b0335a07ac729f328.tar.gz |
Add FreeBSD version information to the menu title so it's possible to
see which release you are installing (really which FreeBSD version the
installer is running, but that shouldn't matter in all normal cases).
PR: bin/100309
Submitted by: Joao Barros <joao.barros@gmail.com> (original version)
Idea from: FreeBSD ideas page
MFC after: 1 week
Diffstat (limited to 'usr.sbin/sysinstall/install.c')
-rw-r--r-- | usr.sbin/sysinstall/install.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 3ff7d8e..f45a74c 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -1182,20 +1182,6 @@ installFilesystems(dialogMenuItem *self) return DITEM_SUCCESS | DITEM_RESTORE; } -static char * -getRelname(void) -{ - static char buf[64]; - size_t sz = (sizeof buf) - 1; - - if (sysctlbyname("kern.osrelease", buf, &sz, NULL, 0) != -1) { - buf[sz] = '\0'; - return buf; - } - else - return "<unknown>"; -} - /* Initialize various user-settable values to their defaults */ int installVarDefaults(dialogMenuItem *self) @@ -1203,7 +1189,9 @@ installVarDefaults(dialogMenuItem *self) char *cp, ncpus[10]; /* Set default startup options */ - variable_set2(VAR_RELNAME, getRelname(), 0); + cp = getsysctlbyname("kern.osrelease"); + variable_set2(VAR_RELNAME, cp, 0); + free(cp); variable_set2(VAR_CPIO_VERBOSITY, "high", 0); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0); variable_set2(VAR_INSTALL_ROOT, "/", 0); |