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] libxl: build fix

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] libxl: build fix
From: John Haxby <john.haxby@xxxxxxxxxx>
Date: Tue, 09 Nov 2010 13:27:05 +0000
Delivery-date: Tue, 09 Nov 2010 05:31:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201011091358.46837.Christoph.Egger@xxxxxxx>
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: <201011051608.47100.Christoph.Egger@xxxxxxx> <201011091239.51488.Christoph.Egger@xxxxxxx> <19673.13957.616191.466954@xxxxxxxxxxxxxxxxxxxxxxxx> <201011091358.46837.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.6
On 09/11/10 12:58, Christoph Egger wrote:
On Tuesday 09 November 2010 12:54:45 Ian Jackson wrote:
Christoph Egger writes ("Re: [Xen-devel] libxl: build fix"):
Attached patch replaces basename with strrchr(3).
...

-        name = basename(filename);
+        name = strrchr(filename, '/');
Sorry, should be

  name = strrchr(filename, '/') + 1;


No, it should be

    name = strrchr(filename, '/');
    if (name)
        name++;
    else
        name = filename;

In fact even that isn't right because basename(3) discards (or at least ignores) trailing '/' characters.

jch


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

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