[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] nandwrite: new mtd-utils applet
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2010-08-24 4:02:45
Message-ID: 201008240602.45175.vda.linux () googlemail ! com
[Download RAW message or body]
On Monday 23 August 2010 06:54, Baruch Siach wrote:
> Hi Denys,
>
> Thanks for your review. See my comments below.
>
> > > + /* TODO: switch to getopt32 once it supports strtou */
> > > + while ((opt = getopt(argc, argv, "ps:")) != -1) {
> >
> > Do use getopt32.
>
> And how do I do the strtou conversion with getopt32?
Example from losetup:
int losetup_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
...
char *opt_o;
unsigned long long offset = 0;
enum {
OPT_d = (1 << 0),
OPT_o = (1 << 1),
OPT_f = (1 << 2),
};
...
opt = getopt32(argv, "do:f", &opt_o);
argv += optind;
if (opt & OPT_o)
offset = xatoull(opt_o);
IOW: it can be simply open-coded...
> > and btw, why mtdoffset is not off_t? MTDs can be larger than 4G, right?
>
> This is how upstream nandwrite is implemented. Upstream also does not support
> MTDs larger than 4GB (yet?), since it uses the 32bit limited MEMERASE ioctl.
> I'm reluctant to extend the Busybox version of nandwrite beyond the
> capabilities of upstream, because upstream might implement this in an
> incompatible way in the future. IMO we should wait for this support to appear
> upstream first, and then catch up. What do you think?
Ok then.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic