Skip to content

Commit d307dbc

Browse files
authored
allow all LOG_* levels (#691)
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]>
1 parent e036ac1 commit d307dbc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/libvfio-user.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,8 +1755,7 @@ vfu_get_poll_fd(vfu_ctx_t *vfu_ctx)
17551755
EXPORT int
17561756
vfu_setup_log(vfu_ctx_t *vfu_ctx, vfu_log_fn_t *log, int log_level)
17571757
{
1758-
1759-
if (log_level != LOG_ERR && log_level != LOG_INFO && log_level != LOG_DEBUG) {
1758+
if (log_level < LOG_EMERG || log_level > LOG_DEBUG) {
17601759
return ERROR_INT(EINVAL);
17611760
}
17621761

0 commit comments

Comments
 (0)