summaryrefslogtreecommitdiff
path: root/include/qemu-common.h
diff options
context:
space:
mode:
authorWenchao Xia <xiawenc@linux.vnet.ibm.com>2013-09-11 14:04:36 +0800
committerKevin Wolf <kwolf@redhat.com>2013-09-12 10:12:47 +0200
commit44e3e053af56c1faec79ac9fdd78ef3f0ecd467e (patch)
tree2a725a4b93021a61d25fee1266816b0c72ee83ac /include/qemu-common.h
parentf323bc9e8b3b46ad28402995a9dcaaeff3eb5e03 (diff)
downloadqemu-44e3e053af56c1faec79ac9fdd78ef3f0ecd467e.zip
qmp: add interface blockdev-snapshot-delete-internal-sync
This interface use id and name as optional parameters, to handle the case that one image contain multiple snapshots with same name which may be '', but with different id. Adding parameter id is for historical compatiability reason, and that case is not possible in qemu's new interface for internal snapshot at block device level, but still possible in qemu-img. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/qemu-common.h')
-rw-r--r--include/qemu-common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 6948bb9177..50548361d0 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -191,6 +191,9 @@ int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix);
int64_t strtosz_suffix_unit(const char *nptr, char **end,
const char default_suffix, int64_t unit);
+/* used to print char* safely */
+#define STR_OR_NULL(str) ((str) ? (str) : "null")
+
/* path.c */
void init_paths(const char *prefix);
const char *path(const char *pathname);