AW: [PATCH] ubimkvol: add -m option to create volume of maximum size
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Wed Jun 19 21:31:28 UTC 2013
On 5 June 2013 08:19:41 <dietmar.schindler at manroland-web.com> wrote:
> > Von: busybox-bounces at busybox.net Im Auftrag von Mike Frysinger
> > Gesendet: Samstag, 1. Juni 2013 01:31
> > An: busybox at busybox.net
> >
> > On Tuesday 28 May 2013 17:35:29 Paul B. Henson wrote:
> > > + if (sscanf(ubi_ctrl, "/dev/ubi%u", &ubinum) != 1)
> > > + bb_error_msg_and_die("%s device node not in
> correct format", "UBI");
> >
> > seems like all of these sscanf would be better off using the existing
> xstrtou() helpers ?
> > ...
>
> Since you don't seem to have followed the conversation, and Mr. Paul B.
> Henson asked to reply to the original message, I restate my concern: Are
> you sure that the version with xstrtou is shorter (which is the motivation
> for the change, if I understand right)? I doubt it. Besides that, the
> version with sscanf is far more readable, especially with multiple
> conversions embedded in the format.
xstrtou() is equally well readable.
Just compare the size(1) of both variants and pick the smaller (and show
dietmar the numbers).
TIA,
Sent with AquaMail for Android
http://www.aqua-mail.com
More information about the busybox
mailing list