bug-hurd
[Top][All Lists]
Advanced

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

task #5363: `uname -m'


From: Constantine Kousoulos
Subject: task #5363: `uname -m'
Date: Thu, 15 Feb 2007 22:28:16 +0200
User-agent: Icedove 1.5.0.9 (X11/20061220)

" `uname -m' currently reports `i686-AT386', compared to `i686' on
GNU/Linux. Is there a reason to be different? "

I have the same question too! :)

It's easy to make 'uname' show just the machine name and not the
ugly '-AT386' part. This is how i did it:

diff -u hurd/proc/host.c.original hurd/proc/host.c.new
--- hurd/proc/host.c.original   2002-05-08 12:24:49.000000000 +0300
+++ hurd/proc/host.c.new        2007-02-15 22:39:14.000000000 +0200
@@ -359,9 +359,8 @@
   err = host_info (mach_host_self (), HOST_BASIC_INFO,
                   (host_info_t) &info, &n);
   assert (! err);
-  snprintf (uname_info.machine, sizeof uname_info.machine, "%s-%s",
-           mach_cpu_types[info.cpu_type],
-           mach_cpu_subtypes[info.cpu_type][info.cpu_subtype]);
+  snprintf (uname_info.machine, sizeof uname_info.machine, "%s",
+           mach_cpu_types[info.cpu_type]);

   /* Notice Mach's and our own version and initialize server version
      variables. */


Question:
Why is there a need for a cpu subtype (AT386)?

Bug report:
I have Hurd running on a Pentium 4 (2.8GHz). For some reason
'uname -m' shows the wrong hardware

# uname -m
i386

It should show 'i686'. The reason probably lies in
gnumach/i386/i386/locore.S but i haven't tried to hack that yet.

Thanks,
Constantine






reply via email to

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