int ch;
struct utsname utsname;
char **banner, *t;
- static char *def_banner[] = { "%s Release %r Version %v (%t)\n\n%n login: ", 0 };
+ static char *def_banner[] = { "%s/%p (%t)\n\n%n login: ", 0 };
/* Clean up tty name. */
if((t = strrchr(ttyname, '/'))) ttyname = t + 1;
* function:
*
* system name Minix
- * node name waddles
- * release name 1.5
- * version 10
- * machine name i86
- * arch i86 (Minix specific)
+ * node name 10.0.2.15
+ * release name 3.2.1
+ * version Minix 3.2.1 (GENERIC)
+ * machine name i686
+ * arch i386 (Minix specific)
*/
#include <sys/types.h>
#define SYSNAME ((unsigned) 0x01)
#define NODENAME ((unsigned) 0x02)
#define RELEASE ((unsigned) 0x04)
+#define VERSION ((unsigned) 0x08)
#define U_MACHINE ((unsigned) 0x10)
#define ARCH ((unsigned) 0x20)
case 'n': info |= NODENAME; break;
case 'r': info |= RELEASE; break;
case 's': info |= SYSNAME; break;
- case 'v': info |= RELEASE; break;
+ case 'v': info |= VERSION; break;
case 'p': info |= ARCH; break;
default: usage();
}
if ((info & (SYSNAME|NODENAME)) != 0)
print(STDOUT_FILENO, " ", (char *) NULL);
print(STDOUT_FILENO, un.release, (char *) NULL);
- print(STDOUT_FILENO, ".", (char *) NULL);
+ }
+ if ((info & VERSION) != 0) {
+ if ((info & (SYSNAME|NODENAME|RELEASE)) != 0)
+ print(STDOUT_FILENO, " ", (char *) NULL);
print(STDOUT_FILENO, un.version, (char *) NULL);
}
if ((info & U_MACHINE) != 0) {
- if ((info & (SYSNAME|NODENAME|RELEASE)) != 0)
+ if ((info & (SYSNAME|NODENAME|RELEASE|VERSION)) != 0)
print(STDOUT_FILENO, " ", (char *) NULL);
print(STDOUT_FILENO, un.machine, (char *) NULL);
}
if ((info & ARCH) != 0) {
- if ((info & (SYSNAME|NODENAME|RELEASE|U_MACHINE)) != 0)
+ if ((info & (SYSNAME|NODENAME|RELEASE|VERSION|U_MACHINE)) != 0)
print(STDOUT_FILENO, " ", (char *) NULL);
print(STDOUT_FILENO, un.arch, (char *) NULL);
}
#define _CONFIG_H
/* Minix release and version numbers. */
-#define OS_RELEASE "3"
-#define OS_VERSION "3.0"
+#define OS_NAME "Minix"
+#define OS_RELEASE "3.3.0"
+#define OS_CONFIG "GENERIC"
+#define OS_VERSION OS_NAME " " OS_RELEASE " (" OS_CONFIG ")"
/* This file sets configuration parameters for the MINIX kernel, FS, and PM.
* It is divided up into two main sections. The first section contains
static void announce(void)
{
/* Display the MINIX startup banner. */
- printf("\nMINIX %s.%s. "
+ printf("\nMINIX %s. "
#ifdef _VCS_REVISION
"(" _VCS_REVISION ")\n"
#endif
"Copyright 2012, Vrije Universiteit, Amsterdam, The Netherlands\n",
- OS_RELEASE, OS_VERSION);
+ OS_RELEASE);
printf("MINIX is open source software, see http://www.minix3.org\n");
}
#include "kernel/proc.h"
struct utsname uts_val = {
- "Minix", /* system name */
+ OS_NAME, /* system name */
"noname", /* node/network name */
- OS_RELEASE, /* O.S. release (e.g. 1.5) */
- OS_VERSION, /* O.S. version (e.g. 10) */
+ OS_RELEASE, /* O.S. release (e.g. 3.3.0) */
+ OS_VERSION, /* O.S. version (e.g. Minix 3.3.0 (GENERIC)) */
"xyzzy", /* machine (cpu) type (filled in later) */
#if defined(__i386__)
"i386", /* architecture */
path="$0"
[ "${path#/*}" = "$path" ] && path="./$path"
-release=`grep OS_RELEASE ${path%/*}/../../include/minix/config.h | awk '{ print $3} ' | tr -d '"'`
-major=`grep OS_VERSION ${path%/*}/../../include/minix/config.h | awk '{ print $3 }' | tr -d '"' | awk -F. ' { print $1 }'`
-minor=`grep OS_VERSION ${path%/*}/../../include/minix/config.h | awk '{ print $3 }' | tr -d '"' | awk -F. ' { print $2 }'`
+release=`grep "define OS_RELEASE" ${path%/*}/../../include/minix/config.h | awk '{ print $3} ' | tr -d '"' | awk -F. ' { print $1 }'`
+major=`grep "define OS_RELEASE" ${path%/*}/../../include/minix/config.h | awk '{ print $3 }' | tr -d '"' | awk -F. ' { print $2 }'`
+minor=`grep "define OS_RELEASE" ${path%/*}/../../include/minix/config.h | awk '{ print $3 }' | tr -d '"' | awk -F. ' { print $3 }'`
case "$option" in