All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 3 of 3 RESEND] libxl: Warn that /usr/bin/pygrub is deprecated
Date: Wed, 9 May 2012 15:48:08 +0100	[thread overview]
Message-ID: <4FAA83A8.8070804@eu.citrix.com> (raw)
In-Reply-To: <1336570982.25514.120.camel@zakaz.uk.xensource.com>

On 09/05/12 14:43, Ian Campbell wrote:
> On Wed, 2012-05-09 at 11:51 +0100, George Dunlap wrote:
>> Signed-off-by: George Dunlap<george.dunlap@eu.citrix.com>
>>
>> diff -r 52f45b258ccc -r 794778a6e9fa tools/libxl/libxl_bootloader.c
>> --- a/tools/libxl/libxl_bootloader.c	Wed May 09 11:39:43 2012 +0100
>> +++ b/tools/libxl/libxl_bootloader.c	Wed May 09 11:42:19 2012 +0100
>> @@ -15,6 +15,7 @@
>>   #include "libxl_osdeps.h" /* must come before any other headers */
>>
>>   #include<termios.h>
>> +#include<string.h>
>>
>>   #include "libxl_internal.h"
>>
>> @@ -398,6 +399,11 @@ int libxl_run_bootloader(libxl_ctx *ctx,
>>           goto out_close;
>>       }
>>
>> +    if ( !strncmp(info->u.pv.bootloader, "/usr/bin/pygrub", 20) )
> Why strncmp and not just strcmp? And why 20? AFAIK
> strlen("/usr/bin/pygrub") == 15 or 16 or so...
ISTR in the past build processes throwing warnings that strcmp() is 
unsafe, and since warnings turn to errors, pre-emptively used the "safe" 
version instead.  Let me give it a try; it should be perfectly safe for 
us, and will remove the issue with manually syncronizing string with its 
size.

  -George

  reply	other threads:[~2012-05-09 14:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 10:51 [PATCH 0 of 3 RESEND] tools: Move bootloaders to libexec directory George Dunlap
2012-05-09 10:51 ` [PATCH 1 of 3 RESEND] libxl: Look for bootloader in libexec path George Dunlap
2012-05-09 13:39   ` Ian Campbell
2012-05-09 14:01     ` George Dunlap
2012-05-09 10:51 ` [PATCH 2 of 3 RESEND] tools: Install pv bootloaders in libexec rather than /usr/bin George Dunlap
2012-05-09 13:41   ` Ian Campbell
2012-05-09 10:51 ` [PATCH 3 of 3 RESEND] libxl: Warn that /usr/bin/pygrub is deprecated George Dunlap
2012-05-09 13:43   ` Ian Campbell
2012-05-09 14:48     ` George Dunlap [this message]
2012-05-10 11:36       ` Ian Jackson
2012-05-10 11:37         ` George Dunlap
2012-05-10 11:44         ` Tim Deegan
2012-05-10 11:47           ` George Dunlap
2012-05-10 12:10             ` Tim Deegan
2012-05-10 13:15           ` Ian Jackson
2012-05-10 13:20             ` Tim Deegan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FAA83A8.8070804@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.