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

Re: [Xen-devel][PATCH][ioemu] strip tap subtype prefix from image name

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel][PATCH][ioemu] strip tap subtype prefix from image name
From: "Christoph Egger" <Christoph.Egger@xxxxxxx>
Date: Wed, 30 Jan 2008 14:07:50 +0100
Cc: Pat Campbell <plc@xxxxxxxxxx>
Delivery-date: Wed, 30 Jan 2008 05:09:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47A07434.1060900@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <47A07434.1060900@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.7
On Wednesday 30 January 2008 13:57:24 Pat Campbell wrote:
> Currently I am not able to mount or boot from an HVM CDROM when it is
> configured for 'tap:aio' instead of 'file'.
>
> disk=[ 'tap:aio:/var/lib/xen/images/sles10-sp2-fv/disk0,hda,w', '
>        tap:aio:/home/iso/sles/SLES10.iso,hdc:cdrom,r', ]
>
> With the attached patch I am able to boot from the CDROM and or mount it.
>
> Patch changes xenstore.c:xenstore_process_event() to strip the tap subtype
> prefix from the image name.
>
> Please apply to xen-unstable tip.
>
> Signed-off-by: Pat Campbell <plc@xxxxxxxxxx>

Please use a more readable coding style.

What you did is this:

if (a) {
        if (b) {
                if (c) {
                        /* do it */
                } else {
                        /* Alternative C */
                } 
        } else {
                /* Alternative B */
        }
} else {
        /* Alternative A */
}
return;



I suggest you to use this style:

if (!a) {
    /* Alternative A */
    return;
}
if (!b) {
    /* Alternative B */
    return;
}
if (!c) {
    /* Alternative C */
    return;
}
/* do it */
return;



-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy



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

<Prev in Thread] Current Thread [Next in Thread>