[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] tools/xenstore: preserve errno across corrupt()



commit bb65cbd81caaaaf325d23f63b4c2165960563459
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Wed Dec 14 12:02:04 2022 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Dec 14 12:02:04 2022 +0100

    tools/xenstore: preserve errno across corrupt()
    
    Let corrupt() preserve errno in order to be able to simplify error
    handling in future.
    
    This is rather easy as the errno value when entering corrupt() is
    saved already.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>
---
 tools/xenstore/xenstored_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index 4cd54c8b5a..f68f82cb19 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -2551,6 +2551,8 @@ void corrupt(struct connection *conn, const char *fmt, 
...)
        talloc_free(str);
 
        check_store();
+
+       errno = saved_errno;
 }
 
 #ifndef NO_SOCKETS
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.