X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=include%2Fqemu-io.h;h=3af513004a686bc67f18f9b0be3760c1246a7038;hb=2048c4eba2b40c850e58616c7033f88a2607b89d;hp=196fde0f3abe2c0ee0b771ee07df697b1bb0850b;hpb=30f3dda24b2a4cd30f8fbf984ab08ef08eaf5020;p=mirror_qemu.git diff --git a/include/qemu-io.h b/include/qemu-io.h index 196fde0f3a..3af513004a 100644 --- a/include/qemu-io.h +++ b/include/qemu-io.h @@ -18,11 +18,15 @@ #ifndef QEMU_IO_H #define QEMU_IO_H -#include "qemu-common.h" #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 +45,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);