diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block.h | 3 | ||||
-rw-r--r-- | include/block/qapi.h | 14 | ||||
-rw-r--r-- | include/qemu-common.h | 3 | ||||
-rw-r--r-- | include/qemu-io.h | 46 | ||||
-rw-r--r-- | include/sysemu/char.h | 2 |
5 files changed, 62 insertions, 6 deletions
diff --git a/include/block/block.h b/include/block/block.h index dc5b388d87..2307f67b0e 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -424,6 +424,9 @@ typedef enum { BLKDBG_CLUSTER_ALLOC_BYTES, BLKDBG_CLUSTER_FREE, + BLKDBG_FLUSH_TO_OS, + BLKDBG_FLUSH_TO_DISK, + BLKDBG_EVENT_MAX, } BlkDebugEvent; diff --git a/include/block/qapi.h b/include/block/qapi.h index e6e568da94..0496cc9282 100644 --- a/include/block/qapi.h +++ b/include/block/qapi.h @@ -29,11 +29,15 @@ #include "block/block.h" #include "block/snapshot.h" -void bdrv_collect_snapshots(BlockDriverState *bs , ImageInfo *info); -void bdrv_collect_image_info(BlockDriverState *bs, - ImageInfo *info, - const char *filename); -BlockInfo *bdrv_query_info(BlockDriverState *s); +int bdrv_query_snapshot_info_list(BlockDriverState *bs, + SnapshotInfoList **p_list, + Error **errp); +void bdrv_query_image_info(BlockDriverState *bs, + ImageInfo **p_info, + Error **errp); +void bdrv_query_info(BlockDriverState *bs, + BlockInfo **p_info, + Error **errp); BlockStats *bdrv_query_stats(const BlockDriverState *bs); void bdrv_snapshot_dump(fprintf_function func_fprintf, void *f, diff --git a/include/qemu-common.h b/include/qemu-common.h index cb82ef3d42..ed8b6e2005 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -174,6 +174,7 @@ char *pstrcat(char *buf, int buf_size, const char *s); int strstart(const char *str, const char *val, const char **ptr); int stristart(const char *str, const char *val, const char **ptr); int qemu_strnlen(const char *s, int max_len); +char *qemu_strsep(char **input, const char *delim); time_t mktimegm(struct tm *tm); int qemu_fls(int i); int qemu_fdatasync(int fd); @@ -191,6 +192,8 @@ int parse_uint_full(const char *s, unsigned long long *value, int base); * A-Z, as strtosz() will use qemu_toupper() on the given argument * prior to comparison. */ +#define STRTOSZ_DEFSUFFIX_EB 'E' +#define STRTOSZ_DEFSUFFIX_PB 'P' #define STRTOSZ_DEFSUFFIX_TB 'T' #define STRTOSZ_DEFSUFFIX_GB 'G' #define STRTOSZ_DEFSUFFIX_MB 'M' diff --git a/include/qemu-io.h b/include/qemu-io.h new file mode 100644 index 0000000000..a418b46a40 --- /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 */ diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 5e42c90df7..066c2161d5 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -70,12 +70,12 @@ struct CharDriverState { void (*chr_set_echo)(struct CharDriverState *chr, bool echo); void (*chr_set_fe_open)(struct CharDriverState *chr, int fe_open); void *opaque; - int idle_tag; char *label; char *filename; int be_open; int fe_open; int explicit_fe_open; + int explicit_be_open; int avail_connections; QemuOpts *opts; QTAILQ_ENTRY(CharDriverState) next; |