From 64ed5f0d3c5eefbb208d4a334654834c78be2cbd Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 12 Jul 2015 16:06:37 +0100 Subject: uname: make OS name configurable A mailing list thread in September 2013 discussed changing the string returned by the non-POSIX 'uname -o' option. Nothing ever came of this because there was no agreement as to what the string should be. Make the string configurable so that people can decide for themselves. Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- coreutils/uname.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coreutils/uname.c') diff --git a/coreutils/uname.c b/coreutils/uname.c index 1c6aa5f79..fd677d27c 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c @@ -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); -- cgit v1.2.3