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] libxl: turn some stray printf's in libxl

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: turn some stray printf's in libxl into LIBXL__LOG.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sat, 21 May 2011 19:15:11 +0100
Delivery-date: Sat, 21 May 2011 11:16:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1305911561 -3600
# Node ID a95b49530efd3c09bcbab0bd8f2503be7c4dc507
# Parent  3b912eb3c6eb5a4fa30f9367ac3b33575de803e7
libxl: turn some stray printf's in libxl into LIBXL__LOG.

Appear to have been leftover from when the domain create stuff was
pushed down from xl into the library.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 3b912eb3c6eb -r a95b49530efd tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Fri May 20 18:09:26 2011 +0100
+++ b/tools/libxl/libxl_create.c        Fri May 20 18:12:41 2011 +0100
@@ -411,7 +411,7 @@
 
     ret = libxl__domain_make(gc, &d_config->c_info, &domid);
     if (ret) {
-        fprintf(stderr, "cannot make domain: %d\n", ret);
+        LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "cannot make domain: %d", ret);
         ret = ERROR_FAIL;
         goto error_out;
     }
@@ -424,7 +424,8 @@
     if ( restore_fd < 0 ) {
         ret = libxl_run_bootloader(ctx, &d_config->b_info, d_config->num_disks 
> 0 ? &d_config->disks[0] : NULL, domid);
         if (ret) {
-            fprintf(stderr, "failed to run bootloader: %d\n", ret);
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "failed to run bootloader: %d", ret);
             goto error_out;
         }
     }
@@ -440,7 +441,7 @@
     }
 
     if (ret) {
-        fprintf(stderr, "cannot (re-)build domain: %d\n", ret);
+        LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "cannot (re-)build domain: %d", ret);
         ret = ERROR_FAIL;
         goto error_out;
     }
@@ -448,7 +449,8 @@
     for (i = 0; i < d_config->num_disks; i++) {
         ret = libxl_device_disk_add(ctx, domid, &d_config->disks[i]);
         if (ret) {
-            fprintf(stderr, "cannot add disk %d to domain: %d\n", i, ret);
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "cannot add disk %d to domain: %d", i, ret);
             ret = ERROR_FAIL;
             goto error_out;
         }
@@ -456,7 +458,8 @@
     for (i = 0; i < d_config->num_vifs; i++) {
         ret = libxl_device_nic_add(ctx, domid, &d_config->vifs[i]);
         if (ret) {
-            fprintf(stderr, "cannot add nic %d to domain: %d\n", i, ret);
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "cannot add nic %d to domain: %d", i, ret);
             ret = ERROR_FAIL;
             goto error_out;
         }
@@ -476,8 +479,8 @@
                                         d_config->vifs, d_config->num_vifs,
                                         &dm_starting);
         if (ret < 0) {
-            fprintf(stderr,"xl: fatal error: %s:%d, rc=%d: 
libxl__create_device_model\n",
-                    __FILE__,__LINE__, ret);
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "failed to create device model: %d", ret);
             goto error_out;
         }
     } else {
@@ -510,8 +513,8 @@
     if (dm_starting) {
         ret = libxl__confirm_device_model_startup(gc, dm_starting);
         if (ret < 0) {
-            fprintf(stderr,"xl: fatal error: %s:%d, rc=%d: 
libxl__confirm_device_model_startup\n",
-                    __FILE__,__LINE__, ret);
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "device model did not start: %d", ret);
             goto error_out;
         }
     }

_______________________________________________
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] libxl: turn some stray printf's in libxl into LIBXL__LOG., Xen patchbot-unstable <=