summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/main.c
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2006-07-15 12:23:56 +0000
committersimon <simon@FreeBSD.org>2006-07-15 12:23:56 +0000
commit0eacf9737caf2565dd819b5b0335a07ac729f328 (patch)
treefc1eb3e89eb516ab8f6f2bc2181f7c4f2cd8b19c /usr.sbin/sysinstall/main.c
parent8f169c00cb7fabb05b0febab6c26286eddd3da1a (diff)
downloadFreeBSD-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/main.c')
-rw-r--r--usr.sbin/sysinstall/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c
index ca31125..7af8d44 100644
--- a/usr.sbin/sysinstall/main.c
+++ b/usr.sbin/sysinstall/main.c
@@ -51,6 +51,7 @@ int
main(int argc, char **argv)
{
int choice, scroll, curr, max, status;
+ char titlestr[80], *arch, *osrel, *ostype;
/* Record name to be able to restart */
StartName = argv[0];
@@ -162,6 +163,17 @@ main(int argc, char **argv)
if (RunningAsInit)
configCountry(NULL);
+ /* Add FreeBSD version info to the menu title */
+ arch = getsysctlbyname("hw.machine_arch");
+ osrel = getsysctlbyname("kern.osrelease");
+ ostype = getsysctlbyname("kern.ostype");
+ snprintf(titlestr, sizeof(titlestr), "%s/%s %s - %s", ostype, arch,
+ osrel, MenuInitial.title);
+ free(arch);
+ free(osrel);
+ free(ostype);
+ MenuInitial.title = titlestr;
+
/* Begin user dialog at outer menu */
dialog_clear();
while (1) {
OpenPOWER on IntegriCloud