Kevin Wolf <kw...@redhat.com> writes: > Am 11.10.2020 um 09:35 hat Markus Armbruster geschrieben: >> From: Kevin Wolf <kw...@redhat.com> >> >> This adds a special meaning for 'help' and '?' as options to the keyval >> parser. Instead of being an error (because of a missing value) or a >> value for an implied key, they now request help, which is a new boolean >> output of the parser in addition to the QDict. >> >> A new parameter 'p_help' is added to keyval_parse() that contains on >> return whether help was requested. If NULL is passed, requesting help >> results in an error and all other cases work like before. >> >> Turning previous error cases into help is a compatible extension. The >> behaviour potentially changes for implied keys: They could previously >> get 'help' as their value, which is now interpreted as requesting help. >> >> This is not a problem in practice because 'help' and '?' are not a valid >> values for the implied key of any option parsed with keyval_parse(): >> >> * audiodev: union Audiodev, implied key "driver" is enum AudiodevDriver, >> "help" and "?" are not among its values >> >> * display: union DisplayOptions, implied key "type" is enum >> DisplayType, "help" and "?" are not among its values >> >> * blockdev: union BlockdevOptions, implied key "driver is enum >> BlockdevDriver, "help" and "?" are not among its values >> >> * export: union BlockExport, implied key "type" is enum BlockExportType, >> "help" and "?" are not among its values >> >> * monitor: struct MonitorOptions, implied key "mode" is enum MonitorMode, >> "help" and "?" are not among its values >> >> * nbd-server: struct NbdServerOptions, no implied key. >> >> Signed-off-by: Kevin Wolf <kw...@redhat.com> >> Signed-off-by: Markus Armbruster <arm...@redhat.com> > >> diff --git a/tests/test-keyval.c b/tests/test-keyval.c >> index 04c62cf045..7b459900af 100644 >> --- a/tests/test-keyval.c >> +++ b/tests/test-keyval.c >> @@ -1,3 +1,4 @@ >> + >> /* >> * Unit tests for parsing of KEY=VALUE,... strings >> * > > This hunk looks unintentional.
It is. Thanks for fixing it up!