Skip to content

Commit

Permalink
allow all LOG_* levels (#691)
Browse files Browse the repository at this point in the history
While libvfio-user doesn't use them all, at least SPDK was expecting to
be able to set LOG_NOTICE level, and silently failing. There's no reason
we can't support any valid syslog level.

Signed-off-by: John Levon <[email protected]>
Reviewed-by: Swapnil Ingle <[email protected]>
  • Loading branch information
jlevon authored May 30, 2022
1 parent e036ac1 commit d307dbc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/libvfio-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1755,8 +1755,7 @@ vfu_get_poll_fd(vfu_ctx_t *vfu_ctx)
EXPORT int
vfu_setup_log(vfu_ctx_t *vfu_ctx, vfu_log_fn_t *log, int log_level)
{

if (log_level != LOG_ERR && log_level != LOG_INFO && log_level != LOG_DEBUG) {
if (log_level < LOG_EMERG || log_level > LOG_DEBUG) {
return ERROR_INT(EINVAL);
}

Expand Down

0 comments on commit d307dbc

Please sign in to comment.