/var/lib/pcp/testsuite/src/indom2int.c is in pcp-testsuite 4.0.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /*
* Copyright (c) 2018 Red Hat.
*
* Convert dotted-form InDoms into raw integers.
*/
#include <pcp/pmapi.h>
int
main(int argc, char *argv[])
{
unsigned int domain, serial;
pmInDom indom;
while (optind < argc) {
if (sscanf(argv[optind++], "%u.%u", &domain, &serial) != 2)
continue;
indom = pmInDom_build(domain, serial);
printf("%u.%u = %u\n", domain, serial, indom);
}
return 0;
}
|