[PATCH] fdisk.c: major whitespace/style cleanup

Jason Schoon floydpink at gmail.com
Fri Feb 24 17:14:17 UTC 2006


I actually have a patch for the non-pretty printing while building fdisk.
It is with a slew of patches I have been meaning to send, but have not made
it to yet.  When I am on my computer with the patches later today, I will
post them all.

BTW: look at the fdisk-specific and from what I can tell completely
unnecessary rule in the Makefile if you want to get rid of it sooner.



On 2/24/06, Rob Landley <rob at landley.net> wrote:
>
> On Friday 24 February 2006 1:44 am, Denis Vlasenko wrote:
> > Hi Rob,
> >
> > I'd like to work on making fdisk.c smaller and saner.
> > But it needs a style cleanup first.
>
> You've picked one of the apps that really can't be made much worse, so
> sure. :)
>
> > With all fdisk-related CONFIG_ options on,
> > produced object file is byte-identical to original:
>
> Ok.
>
> > One obvious bug spotted. Infinite loop:
> >
> > edit_int(int def, char *mesg)
> > {
> >     do {
> >         fputs(mesg, stdout);
> >         printf(" (%d): ", def);
> >         if (!read_line())
> >             return def;
> >     }
> >     while (!isdigit(*line_ptr));    /* FIXME: ?!! */
> >     return atoi(line_ptr);
> > }
>
> The byte-identical bit would seem to imply you haven't fixed it yet. :)
>
> > Please apply the patch.
>
> My rebuild just did this:
>
>   AR cru archival/libunarchive/libunarchive.a
> gcc -I/home/landley/busybox/busybox/include
> -I/home/landley/busybox/busybox/include
> -I/home/landley/busybox/busybox/libbb
> -funsigned-char  -Wall -Wstrict-prototypes -Wshadow -Os -march=i386
> -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0
> -falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG    \
>         -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
>          -c
> -o /home/landley/busybox/busybox/util-linux/fdisk.o
> /home/landley/busybox/busybox/util-linux/fdisk.c
>   AR cru util-linux/util-linux.a
>
> Which is confusing.  (The pretty printing hiccuped?)
>
> Oh well, it built...
>
> Applied.
>
> > --
> > vda
>
> --
> Never bet against the cheap plastic solution.
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20060224/ae2add6e/attachment-0002.htm 


More information about the busybox mailing list