ret = kernctl_disable(event->fd);
if (ret < 0) {
- switch (-ret) {
- case EEXIST:
- ret = LTTNG_ERR_KERN_EVENT_EXIST;
- break;
- default:
- PERROR("disable kernel event");
- break;
- }
+ PERROR("Failed to disable kernel event: name = '%s', fd = %d",
+ event->event->name, event->fd);
goto error;
}
ret = kernctl_disable(event->fd);
if (ret < 0) {
- switch (-ret) {
- case EEXIST:
- ret = LTTNG_ERR_KERN_EVENT_EXIST;
- break;
- default:
- PERROR("Failed to disable kernel event notifier: fd = %d, token = %" PRIu64,
- event->fd, event->token);
- break;
- }
+ PERROR("Failed to disable kernel event notifier: fd = %d, token = %" PRIu64,
+ event->fd, event->token);
goto error;
}