diff options
author | Wenchao Xia <xiawenc@linux.vnet.ibm.com> | 2013-08-27 20:38:22 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2013-08-30 07:41:15 -0400 |
commit | dcc70cdf0932172fc5cf27617a3b033ca58d0176 (patch) | |
tree | 9da3bcbe5feedf6476d2ee59204240331a9c292b /qobject/json-parser.c | |
parent | f5438c0500bb22c97b30987d2e0eab953416c7c5 (diff) | |
download | qemu-dcc70cdf0932172fc5cf27617a3b033ca58d0176.tar.gz |
monitor: refine parse_cmdline()
Since this function will be used by help_cmd() later, so improve
it to make it more generic and easier to use. free_cmdline_args()
is added too as paired function to free the result.
One change of this function is that, when the valid args in input
exceed the limit of MAX_ARGS, it fails now, instead of return with
MAX_ARGS of parsed args in old code. This should not impact much
since it is rare that user input many args in monitor's "help" and
auto complete scenario.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qobject/json-parser.c')
0 files changed, 0 insertions, 0 deletions