Re: How to identity processor architecture

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

 



On Thu, Jan 27, 2011 at 03:23:28PM +0530, prabhu wrote:
> Any C programming technique apart from using this /proc/cpuinfo detail?

What about using the machine field of uname(2):

   $ man 2 uname

Quoting from that man page:

   [...] the operating system  presumably  knows  its name,  release
   and version.   It also knows what hardware it runs on.

Perhaps a downside, it returns the machine type as a string.  Does that
do what you want?

I also find "man linux32" rather interesting:

    setarch  -  change reported architecture in new program environment
    and set personality flags

Might be useful for testing.


Greetings,
Henry

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux