diff options
author | Peter Maydell | 2018-06-11 16:31:20 +0200 |
---|---|---|
committer | Peter Maydell | 2018-06-11 16:31:20 +0200 |
commit | 2afc4e3df80d947dd1bd42ce80278f591b35c74a (patch) | |
tree | 42e78514e9d7531449c612cfa130cd8e2ae97260 /include/qemu-io.h | |
parent | Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-3.0-pull-request' ... (diff) | |
parent | iotests: Add case for a corrupted inactive image (diff) | |
download | qemu-2afc4e3df80d947dd1bd42ce80278f591b35c74a.tar.gz qemu-2afc4e3df80d947dd1bd42ce80278f591b35c74a.tar.xz qemu-2afc4e3df80d947dd1bd42ce80278f591b35c74a.zip |
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2018-06-11' into staging
Block patches:
- Various bug fixes
- Removal of qemu-img convert's deprecated -s option
- qemu-io now exits with an error when a command failed
# gpg: Signature made Mon 11 Jun 2018 15:23:42 BST
# gpg: using RSA key F407DB0061D5CF40
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>"
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40
* remotes/maxreitz/tags/pull-block-2018-06-11: (29 commits)
iotests: Add case for a corrupted inactive image
qcow2: Do not mark inactive images corrupt
block: Make bdrv_is_writable() public
throttle: Fix crash on reopen
block/qcow2-bitmap: fix free_bitmap_clusters
qemu-img: Remove deprecated -s snapshot_id_or_name option
iotests: Fix 219's timing
iotests: improve pause_job
iotests: Test post-backing convert target behavior
qemu-img: Special post-backing convert handling
iotests: Add test for rebasing with relative paths
qemu-img: Resolve relative backing paths in rebase
iotests: Let 216 make use of qemu-io's exit code
iotests.py: Add qemu_io_silent
qemu-io: Exit with error when a command failed
qemu-io: Let command functions return error code
qemu-io: Drop command functions' return values
iotests: Repairing error during snapshot deletion
qcow2: Repair OFLAG_COPIED when fixing leaks
iotests: Rework 113
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/qemu-io.h')
-rw-r--r-- | include/qemu-io.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/qemu-io.h b/include/qemu-io.h index 196fde0f3a..7433239372 100644 --- a/include/qemu-io.h +++ b/include/qemu-io.h @@ -22,7 +22,12 @@ #define CMD_FLAG_GLOBAL ((int)0x80000000) /* don't iterate "args" */ +/* Implement a qemu-io command. + * Operate on @blk using @argc/@argv as the command's arguments, and + * return 0 on success or negative errno on failure. + */ typedef int (*cfunc_t)(BlockBackend *blk, int argc, char **argv); + typedef void (*helpfunc_t)(void); typedef struct cmdinfo { @@ -41,10 +46,10 @@ typedef struct cmdinfo { extern bool qemuio_misalign; -bool qemuio_command(BlockBackend *blk, const char *cmd); +int qemuio_command(BlockBackend *blk, const char *cmd); void qemuio_add_command(const cmdinfo_t *ci); -int qemuio_command_usage(const cmdinfo_t *ci); +void qemuio_command_usage(const cmdinfo_t *ci); void qemuio_complete_command(const char *input, void (*fn)(const char *cmd, void *opaque), void *opaque); |