monitor: cleanup parsing of cmd name and cmd arguments
There's too much going on in monitor_parse_command(). Split up the arguments parsing bits into a separate function monitor_parse_arguments(). Let the original function check for command validity and sub-commands if any and return data (*cmd) that the newly introduced function can process and return a QDict. Also, pass a pointer to the cmdline to track current parser location. Suggested-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NBandan Das <bsd@redhat.com> Acked-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Showing
想要评论请 注册 或 登录