bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inconsistent "uname -s" option


From: Paul Eggert
Subject: Re: inconsistent "uname -s" option
Date: 14 Jul 2003 14:51:37 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Robert Millan <address@hidden> writes:

>   - Make the --help output dependant on the platform, and only say "-s"
>     is for the kernel when running uname on GNU/Linux.

I don't see why this proposed change is needed.  The other kernels
that you mention are commonly called "the OpenBSD kernel", "the
FreeBSD kernel", etc.  It's not misleading for "uname -s" to output
"OpenBSD" on an OpenBSD system.

On many systems, it happens to be that the kernel name is the same as
the operating system name, but this doesn't mean we should confuse the
two notions on all systems.

>   - POSIX says "-s" should:
>     "Write the name of the implementation of the operating system."

And GNU uname does as POSIX requires.  GNU uname's help string
identifies "the implementation of the operating system" with "the
kernel".  This is reasonable.  POSIX itself has no notion of "kernel",
so it can't talk about the kernel in its specification.  But the GNU
help string does not need to be so pedantic.

It might be helpful to document this issue better in the coreutils
manual, to help forestall user confusion in the future.  I notice a
similar discrepancy with uname -m.  Here's a proposed patch.


2003-07-14  Paul Eggert  <address@hidden>

        * doc/coreutils.texi (uname invocation): Explain the POSIX
        terminology behind uname -m and uname -s.

--- coreutils.texi.~1.119.~     Mon Jul 14 14:02:30 2003
+++ coreutils.texi      Mon Jul 14 14:48:01 2003
@@ -10972,7 +10972,8 @@ Print the hardware platform name
 @cindex machine type
 @cindex hardware class
 @cindex hardware type
-Print the machine hardware name (sometimes called the hardware class).
+Print the machine hardware name (sometimes called the hardware class
+or hardware type).
 
 @item -n
 @itemx --nodename
@@ -11013,6 +11014,14 @@ Print the kernel release.
 @cindex kernel name
 @cindex name of kernel
 Print the kernel name.
address@hidden 1003.1-2001 (@pxref{Standards conformance}) calls this
+``the implementation of the operating system'', because the
address@hidden specification itself has no notion of ``kernel''.
+The kernel name might be the same as the operating system name printed
+by the @option{-o} or @option{--operating-system} option, but it might
+differ.  Some operating systems (e.g., FreeBSD, HP-UX) have the same
+name as their underlying kernels; others (e.g., GNU/Linux, Solaris)
+do not.
 
 @item -v
 @itemx --kernel-version




reply via email to

[Prev in Thread] Current Thread [Next in Thread]