Skip to content
Snippets Groups Projects
Commit f3368b52 authored by floreal.risso's avatar floreal.risso
Browse files

error handling

parent bdb2908f
No related branches found
No related tags found
3 merge requests!9fix sensor example (doc),!6Simple memory sensor,!5Add dev name to labels
......@@ -217,7 +217,7 @@ unsigned int get_nb_cpu()
if (n_cpu == 0) {
perror("open()");
fprintf(stderr, "on %s\n", filename);
fprintf(stderr, "on the file: '%s'\n", filename);
switch (cpy_errno) {
case ENOENT:
fprintf(stderr, "Amd rapl works with msr module, try to run 'sudo modprobe msr', then retry.\n");
......@@ -226,7 +226,7 @@ unsigned int get_nb_cpu()
fprintf(stderr, "Amd rapl must be executed with the administrator privilege, try with 'sudo'.\n");
exit(98);
default:
fprintf(stderr, "Unexpected error");
fprintf(stderr, "Unexpected error\n");
exit(97);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment