The `EEXIST` error code does not make sense for a kernctl_disable()
operation. In fact, not existing would be an error.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I8f66c6d6769a4a10e8ff446736c6a7d55a9c32be
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;
}