File: node-parse.c

package info (click to toggle)
numactl 2.0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,228 kB
  • sloc: ansic: 7,295; sh: 460; makefile: 123; awk: 26
file content (20 lines) | stat: -rw-r--r-- 376 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Test wrapper for the nodemask parser */
#include <stdio.h>
#include "numa.h"
#include "util.h"

int main(int ac, char **av)
{
	int err = 0;
	while (*++av) {
		struct bitmask *mask = numa_parse_nodestring(*av);
		if (!mask) {
			printf("Failed to convert `%s'\n", *av);
			err |= 1;
			continue;
		}
		printmask("result", mask);
		numa_bitmask_free(mask);
	}
	return err;
}