bugGNU GRUB - Bugs: bug #33144, [PATCH] Support * as field width...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #33144: [PATCH] Support * as field width or precision in printf

Submitted by:  Josh Triplett <joshtriplett>
Submitted on:  Fri 22 Apr 2011 07:52:51 AM UTC  
 
Category: NoneSeverity: Major
Priority: 5 - NormalItem Group: Feature Request
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: None
Planned Release: None

Fri 22 Apr 2011 08:40:39 PM UTC, comment #3:

a) I didn't realize that; I'll follow up to grub-devel@gnu.org.
b) I'll include a stronger justification in the followup. :)

Josh Triplett <joshtriplett>
Fri 22 Apr 2011 12:31:51 PM UTC, comment #2:

a) This isn't a right place for posting feature patches. Please use -unavailable-
b) grub_printf is in size-critical part. So it has a strong anti-featuritus policy. Unless this new feature is really needed it's rejected. In your case I don't see enough uses of it to justify the inclusion. If you feel like I'm wrong present your argument on -unavailable-

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 22 Apr 2011 07:55:52 AM UTC, comment #1:

Properly formatted ChangeLog entry, marked as verbatim text this time:

Josh Triplett <joshtriplett>
Fri 22 Apr 2011 07:52:51 AM UTC, original submission:

The attached patch implements support for * as the field width or precision in printf, which obtains that field width or precision from the next va_arg. This proves particularly useful for modifying %s: %.*s allows printing a non-NUL-terminated string with a known length.

Tested with the following test cases, all of which worked:

ChangeLog entry:

2011-04-21 Josh Triplett <josh@joshtriplett.org>
2011-04-21 Burt Triplett <burt@pbjtriplett.org>

  • grub-core/kern/misc.c (grub_vsnprintf_real): Add support for '*'

as field width or precision.

Josh Triplett <joshtriplett>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by joshtriplett (Submitted the item)
  • -unavailable- added by joshtriplett
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 22 Apr 2011 12:31:51 PM UTCphcoderStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Fri 22 Apr 2011 07:52:51 AM UTCjoshtriplettAttached File-=>Added grub-printf-star.patch, #23288
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1