For KDBUS_CMD_MATCH_REMOVE, if a match entry is not found or invalid
fail with EBADSLT
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
For KDBUS_CMD_MATCH_REMOVE:
-EINVAL Illegal flags
- -ENOENT A match entry with the given cookie could not be found.
+ -EBADSLT A match entry with the given cookie could not be found.
15. Internal object relations
found = true;
}
- return found ? 0 : -ENOENT;
+ return found ? 0 : -EBADSLT;
}
/**
cmd.size = sizeof(cmd);
cmd.cookie = 0xdeadbeef;
ret = ioctl(env->conn->fd, KDBUS_CMD_MATCH_REMOVE, &cmd);
- if (ret == 0 || errno == ENOENT)
+ if (ret == 0 || errno == EBADSLT)
return 0;
return -errno;