diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-07 08:40:52 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-07 08:40:52 -0500 |
commit | 7387de16d0e4d2988df350926537cd12a8e34206 (patch) | |
tree | 8b7aafb79e2a8197ae002dc3250d9b0ba44520c9 /include/qemu-io.h | |
parent | b8a75b6093309a43f9837bc2ce63bcf15a7b305f (diff) | |
parent | e73fe2b46c38776288415ce7bc8ba3fcd23721c4 (diff) | |
download | hqemu-7387de16d0e4d2988df350926537cd12a8e34206.zip hqemu-7387de16d0e4d2988df350926537cd12a8e34206.tar.gz |
Merge remote-tracking branch 'stefanha/block' into staging
# By Kevin Wolf (19) and others
# Via Stefan Hajnoczi
* stefanha/block: (26 commits)
hmp: add parameters device and -v for info block
hmp: show ImageInfo in 'info block'
qmp: add ImageInfo in BlockDeviceInfo used by query-block
block: add image info query function bdrv_query_image_info()
block: add snapshot info query function bdrv_query_snapshot_info_list()
ide-test: Add FLUSH CACHE test case
ide: Set BSY bit during FLUSH
ide-test: Add enum value for DEV
blkdebug: Add BLKDBG_FLUSH_TO_OS/DISK events
Make qemu-io commands available in HMP
qemu-io: Use the qemu version for -V
qemu-io: Interface cleanup
qemu-io: Move remaining helpers from cmd.c
qemu-io: Move command_loop() and friends
qemu-io: Move functions for registering and running commands
qemu-io: Move qemu_strsep() to cutils.c
qemu-io: Move 'quit' function
qemu-io: Move 'help' function
qemu-io: Factor out qemuio_command
qemu-io: Split off commands to qemu-io-cmds.c
...
Message-id: 1370606325-10680-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include/qemu-io.h')
-rw-r--r-- | include/qemu-io.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/qemu-io.h b/include/qemu-io.h new file mode 100644 index 0000000..a418b46 --- /dev/null +++ b/include/qemu-io.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef QEMU_IO_H +#define QEMU_IO_H + +#include "qemu-common.h" + +#define CMD_FLAG_GLOBAL ((int)0x80000000) /* don't iterate "args" */ + +typedef int (*cfunc_t)(BlockDriverState *bs, int argc, char **argv); +typedef void (*helpfunc_t)(void); + +typedef struct cmdinfo { + const char* name; + const char* altname; + cfunc_t cfunc; + int argmin; + int argmax; + int canpush; + int flags; + const char *args; + const char *oneline; + helpfunc_t help; +} cmdinfo_t; + +bool qemuio_command(BlockDriverState *bs, const char *cmd); + +void qemuio_add_command(const cmdinfo_t *ci); +int qemuio_command_usage(const cmdinfo_t *ci); + +#endif /* QEMU_IO_H */ |