if (caps == NULL) {
fprintf(stderr, "CRITICAL: Cannot get advanced capabilites status.\n");
- return -1;
+ return EXIT_FAILURE;
}
if (cap_get_flag(caps, CAP_DAC_READ_SEARCH, CAP_EFFECTIVE, &capfv) != 0) {
fprintf(stderr, "CRITICAL: Cannot check capability flags.\n");
- return -1;
+ return EXIT_FAILURE;
}
if (capfv != CAP_SET) {
fprintf(stderr, "CRITICAL: Capability CAP_DAC_READ_SEARCH is not set, this capability is required.\n");
cap_free(caps);
- return -1;
+ return EXIT_FAILURE;
}
if (cap_get_flag(caps, CAP_SYS_PTRACE, CAP_EFFECTIVE, &capfv) != 0) {
fprintf(stderr, "CRITICAL: Cannot check capability flags.\n");
- return -1;
+ return EXIT_FAILURE;
}
if (capfv != CAP_SET) {
fprintf(stderr, "CRITICAL: Capability CAP_SYS_PTRACE is not set, this capability is required.\n");
cap_free(caps);
- return -1;
+ return EXIT_FAILURE;
}
cap_free(caps);
}
pthread_mutex_destroy(&exit_mutex);
free(evdev_path);
- return 0;
+ return EXIT_SUCCESS;
bail_out_3:
pthread_join(win_event_loop, NULL);
pthread_mutex_destroy(&exit_mutex);
bail_out_1:
free(evdev_path);
- return -1;
+ return EXIT_FAILURE;
}