← Commit list

64ed5f0d3

Ron Yorston
Ron Yorston
2015-08-03
SUCCESS Duration: 205s

Subject

uname: make OS name configurable

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/Config.src+8 -0
@@ -630,6 +630,14 @@ config UNAME
help
uname is used to print system information.
+config UNAME_OSNAME
+ string "Operating system name"
+ default "GNU/Linux"
+ depends on UNAME
+ help
+ Sets the operating system name reported by uname -o. The
+ default is "GNU/Linux".
+
config UNEXPAND
bool "unexpand"
default y
coreutils/uname.c+2 -2
@@ -74,7 +74,7 @@ typedef struct {
struct utsname name;
char processor[sizeof(((struct utsname*)NULL)->machine)];
char platform[sizeof(((struct utsname*)NULL)->machine)];
- char os[sizeof("GNU/Linux")];
+ char os[sizeof(CONFIG_UNAME_OSNAME)];
} uname_info_t;
static const char options[] ALIGN1 = "snrvmpioa";
@@ -141,7 +141,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv)
#endif
strcpy(uname_info.processor, unknown_str);
strcpy(uname_info.platform, unknown_str);
- strcpy(uname_info.os, "GNU/Linux");
+ strcpy(uname_info.os, CONFIG_UNAME_OSNAME);
#if 0
/* Fedora does something like this */
strcpy(uname_info.processor, uname_info.name.machine);