Instead of combined flags for -c, -s, -t, split into different sets

using an enum and simplify the parsing code.
This commit is contained in:
nicm
2015-12-14 00:31:54 +00:00
parent ecfeee2e82
commit a3129fd4e8
53 changed files with 353 additions and 328 deletions

View File

@ -35,7 +35,10 @@ const struct cmd_entry cmd_detach_client_entry = {
.args = { "as:t:P", 0, 0 },
.usage = "[-P] [-a] [-s target-session] " CMD_TARGET_CLIENT_USAGE,
.flags = CMD_READONLY|CMD_CLIENT_T|CMD_SESSION_S,
.sflag = CMD_SESSION,
.tflag = CMD_CLIENT,
.flags = CMD_READONLY,
.exec = cmd_detach_client_exec
};
@ -46,7 +49,9 @@ const struct cmd_entry cmd_suspend_client_entry = {
.args = { "t:", 0, 0 },
.usage = CMD_TARGET_CLIENT_USAGE,
.flags = CMD_CLIENT_T,
.tflag = CMD_CLIENT,
.flags = 0,
.exec = cmd_detach_client_exec
};