summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-06-17 13:14:46 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-06-17 13:14:46 -0500
commit21a885a7e2a0f532f7653a2607efddbd83504430 (patch)
tree6c633a6174cda24a78cece7a2b157cb108ad42bb /include
parent128dc2d1e4cb98ddbe9c0df2e0c914dc00925dac (diff)
parentdbfbc6373441e436ac6e2bcf7a8acb284225aa21 (diff)
downloadhqemu-21a885a7e2a0f532f7653a2607efddbd83504430.zip
hqemu-21a885a7e2a0f532f7653a2607efddbd83504430.tar.gz
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Luiz Capitulino # Via Luiz Capitulino * luiz/queue/qmp: qerror: drop QERR_OPEN_FILE_FAILED macro block: bdrv_reopen_prepare(): don't use QERR_OPEN_FILE_FAILED savevm: qmp_xen_save_devices_state(): use error_setg_file_open() dump: qmp_dump_guest_memory(): use error_setg_file_open() cpus: use error_setg_file_open() blockdev: use error_setg_file_open() block: mirror_complete(): use error_setg_file_open() rng-random: use error_setg_file_open() error: add error_setg_file_open() helper Message-id: 1371484631-29510-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/qapi/error.h5
-rw-r--r--include/qapi/qmp/qerror.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/include/qapi/error.h b/include/qapi/error.h
index 5cd2f0c..ffd1cea 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -45,6 +45,11 @@ void error_set_errno(Error **err, int os_error, ErrorClass err_class, const char
error_set_errno(err, os_error, ERROR_CLASS_GENERIC_ERROR, fmt, ## __VA_ARGS__)
/**
+ * Helper for open() errors
+ */
+void error_setg_file_open(Error **errp, int os_errno, const char *filename);
+
+/**
* Returns true if an indirect pointer to an error is pointing to a valid
* error object.
*/
diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
index 6c0a18d..c30c2f6 100644
--- a/include/qapi/qmp/qerror.h
+++ b/include/qapi/qmp/qerror.h
@@ -177,9 +177,6 @@ void assert_no_error(Error *err);
#define QERR_NOT_SUPPORTED \
ERROR_CLASS_GENERIC_ERROR, "Not supported"
-#define QERR_OPEN_FILE_FAILED \
- ERROR_CLASS_GENERIC_ERROR, "Could not open '%s'"
-
#define QERR_PERMISSION_DENIED \
ERROR_CLASS_GENERIC_ERROR, "Insufficient permission to perform this operation"
OpenPOWER on IntegriCloud