udevid segfaulting

Bruce Dubbs bruce.dubbs at gmail.com
Sun Oct 28 10:03:33 PDT 2007


Dan Nicholson wrote:
> On 10/28/07, Bruce Dubbs <bruce.dubbs at gmail.com> wrote:
>> Dan Nicholson wrote:
>>
>>> I always use diff -p and I've never had this be a problem with
>>> patch-2.5.4. It's also the default patch mode of git, and some very
>>> large projects distribute patches all over the place in this form. So,
>>> it definitely should work.
>> Hmm.  OK.  I must have done something wrong.  I'm attaching the patch I
>> made.  The last three portions don't apply.  Can you see why?
>>
>>   -- Bruce
>>
>> --- a/extras/usb_id/usb_id.c
>> +++ b/extras/usb_id/usb_id.c
>> @@ -1,7 +1,5 @@
>>  /*
>> - * usb_id.c
>> - *
>> - * Identify an USB (block) device
>> + * usb_id - identify an USB device
>>   *
>>   * Copyright (c) 2005 SUSE Linux Products GmbH, Germany
>>   *
>> @@ -224,8 +222,6 @@ static int usb_id(const char *devpath)
> 
> Can't say I do know why, but the first @@ marker ends without a
> trailing space, which seems a little strange from the other markers.
> Anyway, did you try the "raw" format link Bryan sent you?

Getting it to work wasn't really the issue.  I didn't see that I was
doing wrong.

A little more checking and I found out what happened.  I did a cut/paste
instead of getting the plain ascii I could have just saved.  When I did
that, I evidently introduced some space characters that were not in the
original file.  That seems to have caused the rejection.

My lesson learned here is to not try to create patches by hand.  It is
too easy to introduce problems that are difficult to find.

  -- Bruce



More information about the lfs-dev mailing list