WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [MINI-OS] Add a function mapping grant ta

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [MINI-OS] Add a function mapping grant table error codes to strings.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Jul 2006 21:50:51 +0000
Delivery-date: Fri, 28 Jul 2006 14:53:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID 4a669bd506577b075bc6cf2b0d7c8ac6e5a0dfc0
# Parent  cbfced5fcdb348f23c8727305230b638b16c92dd
[MINI-OS] Add a function mapping grant table error codes to strings.

Signed-off-by: John D. Ramsdell <ramsdell@xxxxxxxxx>
Signed-off-by: Steven Smith <sos22@xxxxxxxxx>
---
 extras/mini-os/gnttab.c         |   12 ++++++++++++
 extras/mini-os/include/gnttab.h |    1 +
 2 files changed, 13 insertions(+)

diff -r cbfced5fcdb3 -r 4a669bd50657 extras/mini-os/gnttab.c
--- a/extras/mini-os/gnttab.c   Fri Jul 28 14:05:02 2006 +0100
+++ b/extras/mini-os/gnttab.c   Fri Jul 28 14:06:27 2006 +0100
@@ -137,6 +137,18 @@ gnttab_alloc_and_grant(void **map)
     return gref;
 }
 
+static const char *gnttabop_error_msgs[] = GNTTABOP_error_msgs;
+
+const char *
+gnttabop_error(int16_t status)
+{
+    status = -status;
+    if (status < 0 || status >= ARRAY_SIZE(gnttabop_error_msgs))
+       return "bad status";
+    else
+        return gnttabop_error_msgs[status];
+}
+
 void
 init_gnttab(void)
 {
diff -r cbfced5fcdb3 -r 4a669bd50657 extras/mini-os/include/gnttab.h
--- a/extras/mini-os/include/gnttab.h   Fri Jul 28 14:05:02 2006 +0100
+++ b/extras/mini-os/include/gnttab.h   Fri Jul 28 14:06:27 2006 +0100
@@ -10,5 +10,6 @@ grant_ref_t gnttab_grant_transfer(domid_
 grant_ref_t gnttab_grant_transfer(domid_t domid, unsigned long pfn);
 unsigned long gnttab_end_transfer(grant_ref_t gref);
 int gnttab_end_access(grant_ref_t ref);
+const char *gnttabop_error(int16_t status);
 
 #endif /* !__GNTTAB_H__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [MINI-OS] Add a function mapping grant table error codes to strings., Xen patchbot-unstable <=