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] blktap2: portability fixes

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] blktap2: portability fixes
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Wed, 24 Jun 2009 15:57:13 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 24 Jun 2009 06:58:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C667E3B6.E0F2%keir.fraser@xxxxxxxxxxxxx>
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: <C667E3B6.E0F2%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.7
Oh, indeed! It's always good to have a second pair of eyes over it.
Attached patch implements blk_uuid_to_string() for NetBSD correctly.
I hope, this is the last iteration over blktap2.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>


On Wednesday 24 June 2009 15:07:50 Keir Fraser wrote:
> I changed this some and applied as c/s 19832. Of particular note is that
> your definition of blk_uuid_to_string() was very broken; all that could be
> said of it is that it builds, but it was fundamentally broken for both
> Linux and NetBSD. Note that uuid_to_string() itself allocates a string
> buffer and returns a pointer to it -- so you need to copy that string to
> the buffer passed to blk_uuid_to_string() and then free it. I didn't
> implement that bit for you, so you need to provide a patch to fix NetBSD's
> blk_uuid_to_string().
>
>  -- Keir
>
> On 24/06/2009 13:24, "Christoph Egger" <Christoph.Egger@xxxxxxx> wrote:
> > Patch is attached.
> > uuid is totally different in Linux and in NetBSD.
> > uuid_t is a char array in Linux and a struct in NetBSD.
> > Making NetBSD uuid look like Linux uuid doesn't work at all and
> > neither the other way around.
> > I renamed your uuid.h header to avoid a recursive inclusion
> > of the same header.
> > I created an uuid abstraction with a Linux and NetBSD implementation.
> >
> > I also fixed a bug in vhd_create_batmap() which slipped in previously.
> > iconv() is a bit nasty to make it compile on both NetBSD and Linux.
> >
> > Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
> >
> > On Tuesday 23 June 2009 18:25:19 Keir Fraser wrote:
> >> This didn't have a prayer of building on Linux. I fixed it up for Linux
> >> and applied as c/s 19817. It's probably broken for netbsd now, but you
> >> should be able to provide a small fixup patch for that.
> >>
> >>  -- Keir
> >>
> >> On 23/06/2009 13:29, "Christoph Egger" <Christoph.Egger@xxxxxxx> wrote:
> >>> Hi!
> >>>
> >>> Attached patch makes blktap2 build on NetBSD.
> >>>
> >>> - Use standard off_t and lseek() instead of non-portable off64_t and
> >>> lseek64() - Use uuid API as documented in DCE 1.1 RPC specification
> >>> - Add NetBSD implementation for blk_getimagesize() and
> >>> blk_getsectorsize() - Use blk_getimagesize() and blk_getsectorsize()
> >>> - Fix uuid header check
> >>>
> >>> Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>



-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

Attachment: xen_blktap2.diff
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>