Back to index

numactl  2.0.8~rc4
node-parse.c
Go to the documentation of this file.
00001 /* Test wrapper for the nodemask parser */
00002 #include <stdio.h>
00003 #include "numa.h"
00004 #include "util.h"
00005 
00006 /* For util.c. Fixme. */
00007 void usage(void)
00008 {
00009        exit(1);
00010 }
00011 
00012 int main(int ac, char **av)
00013 {
00014        int err = 0;
00015        while (*++av) {
00016               struct bitmask *mask = numa_parse_nodestring(*av);
00017               if (!mask) {
00018                      printf("Failed to convert `%s'\n", *av);
00019                      err |= 1;
00020                      continue;
00021               }
00022               printmask("result", mask);
00023               numa_bitmask_free(mask);
00024        }
00025        return err;
00026 }