Thank you for your bug report.

This behavior is according to the documentation. Under the descriptions
for both "-i" and "-p", it states, "Print `unknown' if the kernel does
not make this information easily available, as is the case with Linux
kernels."

Most of the values for options given to the uname command come from a
call to uname(). The "-i" and "-p" options, though, are not defined in
POSIX (and so aren't portable). Some systems, especially BSD, provide
additional, separate information for these concepts of "hardware
architecture" or "processor type", and print these values obtained from
a special system call, either sysinfo() or sysctl(). Linux, however,
does not offer the BSD-style sysinfo() (it has an entirely different
system call named sysinfo()); and it does not offer a value for the
HW_MODEL or HW_MACHINE_ARCH in sysctl().

So, these options are extensions, provided to take advantage of some
more-or-less BSD-specific features. Rather than just give an error when
these options are used on OSses that don't support them, as they could
have done, they opted to have them print "unknown" instead.

The "-m" option, on the other hand, is extremely portable, and may be
depended upon to give reliable results.


** Changed in: coreutils (Ubuntu)
       Status: Unconfirmed => Rejected

-- 
uname -i and -p report "unknown"
https://bugs.launchpad.net/bugs/111863
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to