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

-- 
Slavko
http://slavino.sk

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to