[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [MINI-OS] Add a function mapping grant table error codes to strings.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |