aboutsummaryrefslogtreecommitdiff
path: root/util/error.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@amazon.com>2013-12-06 12:59:58 -0800
committerAnthony Liguori <aliguori@amazon.com>2013-12-06 12:59:58 -0800
commit0a0ee0b93bdd6e1ef628283d00bb979e27655ebb (patch)
treea8e1d34e3a187afc96d8697dfe121032a0268912 /util/error.c
parent9ed5dacbfa0f3f74238854776385f150b68e78b9 (diff)
parent981cbf59b5360647e908186e7306ee9013a58c88 (diff)
Merge remote-tracking branch 'kwolf/tags/for-anthony' into staging
Block patches for 2.0 (flushing block-next) # gpg: Signature made Fri 29 Nov 2013 08:43:18 AM PST using RSA key ID C88F2FD6 # gpg: Can't check signature: public key not found # By Peter Lieven (17) and others # Via Kevin Wolf * kwolf/tags/for-anthony: (41 commits) qemu-iotests: Add sample image and test for VMDK version 3 vmdk: Allow read only open of VMDK version 3 qemu-iotests: Filter out 'qemu-io> ' prompt qemu-iotests: Filter qemu-io output in 025 block: Use BDRV_O_NO_BACKING where appropriate qemu-iotests: Test snapshot mode block: Enable BDRV_O_SNAPSHOT with driver-specific options qemu-iotests: Make test case 030, 040 and 055 deterministic qemu-iotest: Add pause_drive and resume_drive methods blkdebug: add "remove_break" command qemu-iotests: Drop local version of cancel_and_wait from 040 sheepdog: support user-defined redundancy option sheepdog: refactor do_sd_create() qdict: Optimise qdict_do_flatten() qdict: Fix memory leak in qdict_do_flatten() MAINTAINERS: add sheepdog development mailing list COW: Extend checking allocated bits to beyond one sector COW: Speed up writes qapi: Change BlockDirtyInfo to list block: per caller dirty bitmap ... Message-id: 1385743555-27888-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'util/error.c')
-rw-r--r--util/error.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/error.c b/util/error.c
index ec0faa6176..3ee362a7f5 100644
--- a/util/error.c
+++ b/util/error.c
@@ -27,6 +27,7 @@ void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)
{
Error *err;
va_list ap;
+ int saved_errno = errno;
if (errp == NULL) {
return;
@@ -41,6 +42,8 @@ void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)
err->err_class = err_class;
*errp = err;
+
+ errno = saved_errno;
}
void error_set_errno(Error **errp, int os_errno, ErrorClass err_class,
@@ -49,6 +52,7 @@ void error_set_errno(Error **errp, int os_errno, ErrorClass err_class,
Error *err;
char *msg1;
va_list ap;
+ int saved_errno = errno;
if (errp == NULL) {
return;
@@ -69,6 +73,8 @@ void error_set_errno(Error **errp, int os_errno, ErrorClass err_class,
err->err_class = err_class;
*errp = err;
+
+ errno = saved_errno;
}
void error_setg_file_open(Error **errp, int os_errno, const char *filename)