Re: [RC] lscpu - CPU architecture information helper

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

 



On Thu, Jul 10, 2008 at 03:59:51PM +0800, Cai Qian wrote:
> I attached the ready-to-release version of this new tool, and its

 Refactored version applied. Thanks.

> manpage. It has been tested successfully on various of machines
> including i686, x86_64, ia64, ppc64 and s390(x). The final output will

 I'd like to add some regression tests. It shouldn't be a problem to
 copy relevant files from /proc and /sys to tests/input/ts-lscpu/<arch>
 and run lscpu(1) against this files.

> int
> main (int argc, char *argv[])
> {
>   int c, i, j;
>   int parsable = 0, have_topology = 0, have_cache = 0, have_node = 0;
>   int cpu = 0, thread = 0, core = 0, socket = 0, node = 0, ncache = 0;
>   int option_index, camap[CACHE_MAX], *nodecpu, pad = 23;
>   char buf[BUFSIZ], buf2[BUFSIZ], buf3[BUFSIZ];
>   char *syspath = "/sys/devices/system", *cpu0path;
>   char *arch, *vendor = NULL, *family = NULL, *model = NULL;
>   char *mhz = NULL, *stepping = NULL, *flags = NULL;
>   char *(caname[CACHE_MAX]), *(casize[CACHE_MAX]);
>   FILE *fp;
>   DIR *dp;
>   struct dirent *dir;
>   struct utsname utsbuf;
>   struct stat info;

 This block was "refactoring trigger" :-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux