xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xen.org
Cc: Olaf Hering <olaf@aepfle.de>,
	Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com
Subject: [PATCH 2/4] tools/libxc: assign positive values to errno
Date: Fri,  7 Mar 2014 10:15:07 +0100	[thread overview]
Message-ID: <1394183709-9956-3-git-send-email-olaf@aepfle.de> (raw)
In-Reply-To: <1394183709-9956-1-git-send-email-olaf@aepfle.de>

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 tools/libxc/xc_foreign_memory.c | 2 +-
 tools/libxc/xc_mem_paging.c     | 2 +-
 tools/libxc/xc_minios.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/libxc/xc_foreign_memory.c b/tools/libxc/xc_foreign_memory.c
index 7dfc817..43abf01 100644
--- a/tools/libxc/xc_foreign_memory.c
+++ b/tools/libxc/xc_foreign_memory.c
@@ -27,7 +27,7 @@ void *xc_map_foreign_pages(xc_interface *xch, uint32_t dom, int prot,
     int i, *err;
 
     if (num < 0) {
-        errno = -EINVAL;
+        errno = EINVAL;
         return NULL;
     }
 
diff --git a/tools/libxc/xc_mem_paging.c b/tools/libxc/xc_mem_paging.c
index 269cbdd..8aa7d4d 100644
--- a/tools/libxc/xc_mem_paging.c
+++ b/tools/libxc/xc_mem_paging.c
@@ -76,7 +76,7 @@ int xc_mem_paging_load(xc_interface *xch, domid_t domain_id,
 {
     int rc, old_errno;
 
-    errno = -EINVAL;
+    errno = EINVAL;
 
     if ( !buffer )
         return -1;
diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c
index a48f0de..e621417 100644
--- a/tools/libxc/xc_minios.c
+++ b/tools/libxc/xc_minios.c
@@ -349,7 +349,7 @@ static int minios_evtchn_unbind(xc_evtchn *xce, xc_osdep_handle h, evtchn_port_t
         }
     }
     printf("Warning: couldn't find port %"PRId32" for xc handle %x\n", port, fd);
-    errno = -EINVAL;
+    errno = EINVAL;
     return -1;
 }

  parent reply	other threads:[~2014-03-07  9:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07  9:15 [PATCH 0/4] tools/libxc: various errno changes Olaf Hering
2014-03-07  9:15 ` [PATCH 1/4] tools/libxc: remove double inclusion of errno.h Olaf Hering
2014-03-10 16:50   ` Ian Jackson
2014-03-07  9:15 ` Olaf Hering [this message]
2014-03-10 16:51   ` [PATCH 2/4] tools/libxc: assign positive values to errno Ian Jackson
2014-03-11 13:17     ` Ian Campbell
2014-03-11 14:35       ` Olaf Hering
2014-03-11 14:39         ` Ian Campbell
2014-03-11 15:24       ` Ian Jackson
2014-03-07  9:15 ` [PATCH 3/4] tools/xc: preserve errno in ERROR and DRINTF macros Olaf Hering
2014-03-10 16:51   ` Ian Jackson
2014-03-07  9:15 ` [PATCH 4/4 v2] tools/xc: pass errno to callers of xc_domain_save Olaf Hering
2014-03-10 16:59   ` Ian Jackson
2014-03-10 18:24     ` Olaf Hering
2014-03-11  7:49       ` Olaf Hering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394183709-9956-3-git-send-email-olaf@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).