qemu-io: use readline.c
Use readline.c for command-line history. There was support for GNUReadline and BSD Editline but it was never compiled in. Since QEMU hasits own readline.c, just use that when qemu-io runs with stdin attachedto a terminal.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>...
qemu-io: add command completion
Autocomplete qemu-io commands at the interactive prompt.
Note this only completes command names and not their options.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blkdebug: Use errp for read_config()
Use an Error variable in the read_config() function.
Signed-off-by: Max Reitz <mreitz@redhat.com>Reviewed-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blkdebug: Don't require sophisticated filename
If the filename is not prefixed by "blkdebug:" inblkdebug_parse_filename(), the blkdebug driver was not selected throughthat protocol prefix, but by an explicit command line option(file.driver=blkdebug or something similar). Contrary to the current...
qdict: Add qdict_array_split()
This function splits a QDict consisting of entries prefixed byincrementally enumerated indices into a QList of QDicts.
Signed-off-by: Max Reitz <mreitz@redhat.com>Reviewed-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
qapi: extend qdict_flatten() for QLists
Reversing qdict_array_split(), qdict_flatten() should flatten QLists aswell by interpreting them as QDicts where every entry's key is itsindex.
This allows bringing QDicts with QLists from QMP commands to the same...
qemu-option: Add qemu_config_parse_qdict()
This function basically parses command-line options given as a QDictreplacing a config file.
For instance, the QDict {"section.opt1": 42, "section.opt2": 23}corresponds to the config file:
[section]opt1 = 42...
blkdebug: Always call read_config()
Move the check whether there actually is a config file into theread_config() function.
blkdebug: Use command-line in read_config()
Use qemu_config_parse_qdict() to parse the command-line options inaddition to the config file.
Signed-off-by: Max Reitz <mreitz@redhat.com>Reviewed-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: Allow reference for bdrv_file_open()
Allow specifying a reference to an existing block device (by name) forbdrv_file_open() instead of a filename and/or options.
Signed-off-by: Max Reitz <mreitz@redhat.com>Reviewed-by: Kevin Wolf <kwolf@redhat.com>...
View all revisions | View revisions
Also available in: Atom