/var/lib/pcp/testsuite/src/parseinterval.c is in pcp-testsuite 3.8.12ubuntu1.
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 22 23 24 25 26 27 28 29 | #include <pcp/pmapi.h>
int
main(int argc, char *argv[])
{
int sts;
char *err;
struct timeval time;
while (argc > 1) {
printf("\"%s\"", argv[1]);
sts = pmParseInterval(argv[1], &time, &err);
if (sts == -1) {
printf(" Error:\n%s", err);
free(err);
}
else if (sts == 0) {
printf(" Time: %ld.%06ld sec\n",
(long)time.tv_sec, (long)time.tv_usec);
}
else {
printf(" Bogus return value: %d\n", sts);
}
argc--;
argv++;
}
return 0;
}
|