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-devel

[Xen-devel] [PATCH 1 of 5] libxl: explicitly set disk format in libxl__a

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1 of 5] libxl: explicitly set disk format in libxl__append_disk_list_of_type
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 04 Apr 2011 14:21:04 +0100
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Mon, 04 Apr 2011 06:23:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1301923263@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1301923263@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1301923169 -3600
# Node ID 0191af544eee4c50fce1843099d7cd1ea98a2afd
# Parent  834eb0965ea0c90ed433d6849fbcb2c374ea40a3
libxl: explicitly set disk format in libxl__append_disk_list_of_type

Ideally we should be able to infer the format from something stashed
in xenstore but this is better than letting users see garbage values.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 834eb0965ea0 -r 0191af544eee tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Mon Apr 04 14:19:29 2011 +0100
+++ b/tools/libxl/libxl.c       Mon Apr 04 14:19:29 2011 +0100
@@ -1787,6 +1787,7 @@ static unsigned int libxl__append_disk_l
                 pdisk->readwrite = 0;
             type = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, 
"%s/device-type", libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, 
"%s/%s/frontend", be_path, *dir))));
             pdisk->is_cdrom = !strcmp(type, "cdrom");
+            pdisk->format = DISK_FORMAT_UNKNOWN;
         }
     }
 

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