commit b421a4c66ce636adff150dd1aa8eafa981c2693d Author: Miroslav Lichvar Date: Wed Jan 3 14:45:51 2024 +0100 pmc: Allow missing values in SUBSCRIBE_EVENTS_NP command. Don't require all supported notifications to be specified in the command for compatibility with older scripts. Signed-off-by: Miroslav Lichvar diff --git a/pmc_common.c b/pmc_common.c index 62e34a6..b88cfc2 100644 --- a/pmc_common.c +++ b/pmc_common.c @@ -310,8 +310,8 @@ static void do_set_action(struct pmc *pmc, int action, int index, char *str) onoff_port_state, onoff_time_status, onoff_parent_data_set); - if (cnt != 4) { - fprintf(stderr, "%s SET needs 4 values\n", + if (cnt < 2) { + fprintf(stderr, "%s SET needs at least 2 values\n", idtab[index].name); break; }