Patch / RFC: add "flashcp" applet
Tito
farmatito at tiscali.it
Sun Nov 15 13:57:33 UTC 2009
On Saturday 14 November 2009 22:53:22 Stefan Seyfried wrote:
> On Sat, 14 Nov 2009 22:15:14 +0100
> Tito <farmatito at tiscali.it> wrote:
>
> > Hi,
> > just some ideas I had while looking at your patch,
> > hope they can help you to improve/optimize it.
>
> Thanks, I will check them. I btw. just did not think of "puts" instead
> of "printf ... \n", will check all those, too.
>
> > Ciao,
> > Tito
> >
> > PS.: progress() is used only in two sites, is it worth the hassle, couldn't it be inlined?
>
> My first incarnation used it more often (there were two loops, one for
> write and one for verify), and then it was a clear win. I will check if
> is still is now.
>
snip
> >
> > Use xioctl here?
>
> I actually want the "is no valid MTD flash" error here, not only "ioctl
> 0x12345 failed". Did you never try to fcp something
> into /dev/mtdblock/x? ;-)
You can set :
Busybox Library Tuning
[*] Use ioctl names rather than hex values in error messages
> > > + if (ioctl(fd_d, MEMGETINFO, &mtd) < 0) {
> > > + bb_error_msg_and_die("%s is no valid MTD flash device", argv[1]);
> > > + }
> > > +
> > > + fd_f = xopen(argv[0], O_RDONLY);
> >
snip
Ciao,
Tito
More information about the busybox
mailing list