On 05/25/2013 07:55 AM, Slavko wrote:
Dňa 25.05.2013 12:34 Claudius Hubig  wrote / napísal(a):
Dear Vladimir,

Vladimir Budnev wrote:
While trying some opensource utility I'v found that one of launching
scripts uses uname -i | grep x86_64 to check for 64/32 bit platform and
futher processing.
-i is for the ‘hardware platform’. You likely rather want to use
‘-m’, which gives the ‘machine hardware name’. While the naming
appears a little strange, the former is probably intended to give the
actual hardware architecture, whereas the latter gives the kernel
architecture.

An i386 kernel running on an amd64 CPU would hence give out ‘i386’ (or
something like that) when queried via -m, whereas ‘-i’, if available,
would have to say ‘x86_64’ – which doesn’t help at all, since the
kernel couldn’t run such code.
Small example from my machine – Debian testing:

slavko@bonifac:~$ uname -i
unknown

but:

slavko@bonifac:~$ uname -m
x86_64

regards

I don't get those results. Here are my results, including the kernel.

Linux linux1.localdomain 3.2.18-pclos2.pae.bfs #1 SMP PREEMPT Thu May 24 05:33:57 CEST 2012 i686 i686 i386 GNU/Linux
[doug@linux1 ~]$ uname -i
i386
[doug@linux1 ~]$ uname -m
i686

IOW, I'm running a 32-bit kernel on a 64-bit processor.
Perhaps uname is set up differently in Debian? Should it be?

--doug


--
Blessed are the peacemakers..for they shall be shot at from both sides. 
--A.M.Greeley


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/51a1042e.1020...@optonline.net

Reply via email to