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

[Xen-changelog] xc_gnttab.c, xc_evtchn.c:



ChangeSet 1.1681, 2005/06/06 10:28:15+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        xc_gnttab.c, xc_evtchn.c:
          Cleanup error message printing and error exit code path.
        xc_vmx_build.c, xc_private.c, xc_plan9_build.c, xc_linux_build.c:
          Cleanup error message printing.
        Signed-off-by: Nguyen Anh Quynh <aquynh@xxxxxxxxx>
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 xc_evtchn.c      |   13 +++++++------
 xc_gnttab.c      |   14 ++++++--------
 xc_linux_build.c |    4 ++--
 xc_plan9_build.c |    2 +-
 xc_private.c     |    4 ++--
 xc_vmx_build.c   |    2 +-
 6 files changed, 19 insertions(+), 20 deletions(-)


diff -Nru a/tools/libxc/xc_evtchn.c b/tools/libxc/xc_evtchn.c
--- a/tools/libxc/xc_evtchn.c   2005-06-06 06:01:44 -04:00
+++ b/tools/libxc/xc_evtchn.c   2005-06-06 06:01:44 -04:00
@@ -19,15 +19,16 @@
 
     if ( mlock(op, sizeof(*op)) != 0 )
     {
-        PERROR("Could not lock memory for Xen hypercall");
-        goto out1;
+        PERROR("do_evtchn_op: op mlock failed");
+        goto out;
     }
 
-    if ( (ret = do_xen_hypercall(xc_handle, &hypercall)) < 0 )
-        goto out2;
+    if ((ret = do_xen_hypercall(xc_handle, &hypercall)) < 0)
+        ERROR("do_evtchn_op: HYPERVISOR_event_channel_op failed: %d", ret);
 
- out2: (void)munlock(op, sizeof(*op));
- out1: return ret;
+    (void)munlock(op, sizeof(*op));
+ out:
+    return ret;
 }
 
 
diff -Nru a/tools/libxc/xc_gnttab.c b/tools/libxc/xc_gnttab.c
--- a/tools/libxc/xc_gnttab.c   2005-06-06 06:01:44 -04:00
+++ b/tools/libxc/xc_gnttab.c   2005-06-06 06:01:44 -04:00
@@ -26,18 +26,16 @@
 
     if ( mlock(op, sizeof(*op)) != 0 )
     {
-        PERROR("Could not lock memory for Xen hypercall");
-        goto out1;
+        PERROR("do_gnttab_op: op mlock failed");
+        goto out;
     }
 
     if ( (ret = do_xen_hypercall(xc_handle, &hypercall)) < 0 )
-    {
-        printf("do_gnttab_op: hypercall returned error %d\n", ret);
-        goto out2;
-    }
+        ERROR("do_gnttab_op: HYPERVISOR_grant_table_op failed: %d", ret);
 
- out2: (void)munlock(op, sizeof(*op));
- out1: return ret;
+    (void)munlock(op, sizeof(*op));
+ out:
+    return ret;
 }
 
 
diff -Nru a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      2005-06-06 06:01:44 -04:00
+++ b/tools/libxc/xc_linux_build.c      2005-06-06 06:01:44 -04:00
@@ -193,7 +193,7 @@
     }
 
     (load_funcs.loadimage)(image, image_size, xc_handle, dom, page_array,
-                          &dsi);
+                           &dsi);
 
     /* Load the initial ramdisk image. */
     if ( initrd_len != 0 )
@@ -466,7 +466,7 @@
 
     if ( mlock(&st_ctxt, sizeof(st_ctxt) ) )
     {   
-        PERROR("Unable to mlock ctxt");
+        PERROR("xc_linux_build: ctxt mlock failed");
         return 1;
     }
 
diff -Nru a/tools/libxc/xc_plan9_build.c b/tools/libxc/xc_plan9_build.c
--- a/tools/libxc/xc_plan9_build.c      2005-06-06 06:01:44 -04:00
+++ b/tools/libxc/xc_plan9_build.c      2005-06-06 06:01:44 -04:00
@@ -434,7 +434,7 @@
 
        DPRINTF(("xc_get_tot_pages returns %ld pages\n", tot_pages));
        if (mlock(&st_ctxt, sizeof (st_ctxt))) {
-               PERROR("Unable to mlock ctxt");
+               PERROR("xc_plan9_build: ctxt mlock failed");
                return 1;
        }
 
diff -Nru a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  2005-06-06 06:01:44 -04:00
+++ b/tools/libxc/xc_private.c  2005-06-06 06:01:44 -04:00
@@ -122,7 +122,7 @@
 
     if ( mlock(mmu->updates, sizeof(mmu->updates)) != 0 )
     {
-        PERROR("Could not lock pagetable update array");
+        PERROR("flush_mmu_updates: mmu updates mlock failed");
         err = 1;
         goto out;
     }
@@ -226,7 +226,7 @@
 
     if ( mlock(pfn_buf, max_pfns * sizeof(unsigned long)) != 0 )
     {
-        PERROR("Could not lock pfn list buffer");
+        PERROR("xc_get_pfn_list: pfn_buf mlock failed");
         return -1;
     }    
 
diff -Nru a/tools/libxc/xc_vmx_build.c b/tools/libxc/xc_vmx_build.c
--- a/tools/libxc/xc_vmx_build.c        2005-06-06 06:01:44 -04:00
+++ b/tools/libxc/xc_vmx_build.c        2005-06-06 06:01:44 -04:00
@@ -529,7 +529,7 @@
 
     if ( mlock(&st_ctxt, sizeof(st_ctxt) ) )
     {   
-        PERROR("Unable to mlock ctxt");
+        PERROR("xc_vmx_build: ctxt mlock failed");
         return 1;
     }
 

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


 


Rackspace

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