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

xen-devel

[Top] [All Lists]

Re: [Xen-devel] Re: [Xen-staging] [xen-unstable] Clean up arch_get_xen_c

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Re: [Xen-staging] [xen-unstable] Clean up arch_get_xen_caps() to not use sprintf().
From: Alex Williamson <alex.williamson@xxxxxx>
Date: 2007年1月30日 23:31:24 -0700
Cc: Keir Fraser <keir@xxxxxxxxxxxxx>
Delivery-date: 2007年1月30日 22:31:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1170224401.10792.116.camel@bling >
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>
Organization: HP OSLO R&D
References: <200701301624.l0UGOJuF027110@xxxxxxxxxxxxxxxxxxxxxxx> <1170224401.10792.116.camel@bling >
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2007年01月30日 at 23:20 -0700, Alex Williamson wrote:
> On Tue, 2007年01月30日 at 16:24 +0000, Xen staging patchbot-unstable wrote:
> > diff -r bd69e83b65ea -r 9578ae319874 xen/arch/ia64/xen/xensetup.c
> > --- a/xen/arch/ia64/xen/xensetup.c Tue Jan 30 16:14:16 2007 +0000
> > +++ b/xen/arch/ia64/xen/xensetup.c Tue Jan 30 16:23:43 2007 +0000
> > @@ -547,18 +547,19 @@ printk("num_online_cpus=%d, max_cpus=%d\
> > 
> > void arch_get_xen_caps(xen_capabilities_info_t info)
> > {
> > - char *p=info;
> > int major = xen_major_version();
> > int minor = xen_minor_version();
> > -
> > - p += snprintf(p,sizeof(info), "xen-%d.%d-ia64 ", major, minor);
> > + char s[32];
> > +
> > + info[0] = '0円';
> > +
> > + snprintf(s, sizeof(s), "xen-%d.%d-ia54 ", major, minor);
> > + safe_strcat(info, s);
>
> This doesn't work. info is just a char* here, so the sizeof() in
> safe_strcat() only cats the first 8 bytes (or 4 on x86_32 I suppose).
 And there's a typo, ia64, not 54. Thanks,
 Alex
-- 
Alex Williamson HP Open Source & Linux Org.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] Re: [Xen-staging] [xen-unstable] Clean up arch_get_xen_caps() to not use sprintf(). , Alex Williamson
Next by Date: [Xen-devel] [PATCH] compilation fix of linux/drivers/oprofile/oprof.c , Isaku Yamahata
Previous by Thread: [Xen-devel] Re: [Xen-staging] [xen-unstable] Clean up arch_get_xen_caps() to not use sprintf(). , Alex Williamson
Next by Thread: Re: [Xen-devel] Re: [Xen-staging] [xen-unstable] Clean up arch_get_xen_caps() to not use sprintf(). , Ian Campbell
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /