From 874a9aa44d180dabbe2028f74b6728317fe06f6c Mon Sep 17 00:00:00 2001 From: David Teigland Date: Mar 13 2020 16:47:09 +0000 Subject: sanlock: special debug_cmd all value --- diff --git a/src/main.c b/src/main.c index 8df2495..8c6eef8 100644 --- a/src/main.c +++ b/src/main.c @@ -2837,11 +2837,17 @@ static void read_config_file(void) } else if (!strcmp(str, "debug_cmd")) { get_val_str(line, str); - cmd = cmd_str_to_num(str+1); - if (cmd && (str[0] == '+')) - set_cmd_debug(cmd); - else if (cmd && (str[0] == '-')) - clear_cmd_debug(cmd); + if (!strcmp(str, "+all")) + com.debug_cmds = ~0LL; + else if (!strcmp(str, "-all")) + com.debug_cmds = 0LL; + else { + cmd = cmd_str_to_num(str+1); + if (cmd && (str[0] == '+')) + set_cmd_debug(cmd); + else if (cmd && (str[0] == '-')) + clear_cmd_debug(cmd); + } } else if (!strcmp(str, "max_sectors_kb")) { memset(str, 0, sizeof(str)); diff --git a/src/sanlock.8 b/src/sanlock.8 index 3ebbce7..d75211d 100644 --- a/src/sanlock.8 +++ b/src/sanlock.8 @@ -1361,7 +1361,9 @@ By default sanlock disables some command level debugging for commands that are often repetitive and fill the in memory debug buffer. This only affects debug logging, not errors or warnings, and disabling command level debugging for a command does not disable lower level debugging -for that command. +for that command. Special values +all and -all can be used to +enable or disable all commands, and can be used before or after other +debug_cmd lines. .SH SEE ALSO .BR wdmd (8)