Message ID | 1461701022-21023-1-git-send-email-richard@nod.at |
---|---|
State | Changes Requested |
Headers | show |
On Tue, 26 Apr 2016 22:03:42 +0200 Richard Weinberger <richard@nod.at> wrote: > Well, flash_erase <mtddev> 0 0 is the same as flash_eraseall <mtddev>. > But flash_eraseall is still more handy to use. > Let's keep flash_eraseall as short cut and don't force users to > use a less handy user interface. Hm, I'm not convinced by this change. Aren't we trying to make people switch to flash_erase instead of using flash_eraseall. If you want to make flash_erase more easy to use, you can always erase the whole partition if only <mtddev> is passed in arguments, which IMO would be clearer than having to pass 0 0. > > Signed-off-by: Richard Weinberger <richard@nod.at> > --- > misc-utils/flash_eraseall | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/misc-utils/flash_eraseall b/misc-utils/flash_eraseall > index c5539b3..65a85cc 100755 > --- a/misc-utils/flash_eraseall > +++ b/misc-utils/flash_eraseall > @@ -1,4 +1,3 @@ > #!/bin/sh > -echo "${0##*/} has been replaced by \`flash_erase <mtddev> 0 0\`; please use it" 1>&2 > [ $# -ne 0 ] && set -- "$@" 0 0 > exec flash_erase "$@"
Am 27.04.2016 um 10:21 schrieb Boris Brezillon: >> Well, flash_erase <mtddev> 0 0 is the same as flash_eraseall <mtddev>. >> But flash_eraseall is still more handy to use. >> Let's keep flash_eraseall as short cut and don't force users to >> use a less handy user interface. > > Hm, I'm not convinced by this change. Aren't we trying to make people > switch to flash_erase instead of using flash_eraseall. > If you want to make flash_erase more easy to use, you can always erase > the whole partition if only <mtddev> is passed in arguments, which IMO > would be clearer than having to pass 0 0. So, you suggest fixing flash_erase such that a "flash_erase /dev/mtd0" works and acts like "flash_erase /dev/mtd0 0 0"? Would work too. :-) Thanks, //richard
On Wed, 27 Apr 2016 10:27:33 +0200 Richard Weinberger <richard@nod.at> wrote: > Am 27.04.2016 um 10:21 schrieb Boris Brezillon: > >> Well, flash_erase <mtddev> 0 0 is the same as flash_eraseall <mtddev>. > >> But flash_eraseall is still more handy to use. > >> Let's keep flash_eraseall as short cut and don't force users to > >> use a less handy user interface. > > > > Hm, I'm not convinced by this change. Aren't we trying to make people > > switch to flash_erase instead of using flash_eraseall. > > If you want to make flash_erase more easy to use, you can always erase > > the whole partition if only <mtddev> is passed in arguments, which IMO > > would be clearer than having to pass 0 0. > > So, you suggest fixing flash_erase such that a "flash_erase /dev/mtd0" > works and acts like "flash_erase /dev/mtd0 0 0"? Yep. > > Would work too. :-) > > Thanks, > //richard
Hi, On Wed, Apr 27, 2016 at 10:29:47AM +0200, Boris Brezillon wrote: > On Wed, 27 Apr 2016 10:27:33 +0200 > Richard Weinberger <richard@nod.at> wrote: > > > Am 27.04.2016 um 10:21 schrieb Boris Brezillon: > > >> Well, flash_erase <mtddev> 0 0 is the same as flash_eraseall <mtddev>. > > >> But flash_eraseall is still more handy to use. ^ Acked. > > >> Let's keep flash_eraseall as short cut and don't force users to > > >> use a less handy user interface. > > > > > > Hm, I'm not convinced by this change. Aren't we trying to make people > > > switch to flash_erase instead of using flash_eraseall. > > > If you want to make flash_erase more easy to use, you can always erase > > > the whole partition if only <mtddev> is passed in arguments, which IMO > > > would be clearer than having to pass 0 0. > > > > So, you suggest fixing flash_erase such that a "flash_erase /dev/mtd0" > > works and acts like "flash_erase /dev/mtd0 0 0"? > > Yep. Agreed, good idea. (FWIW, flash_lock and flash_unlock do similarly.) Brian
diff --git a/misc-utils/flash_eraseall b/misc-utils/flash_eraseall index c5539b3..65a85cc 100755 --- a/misc-utils/flash_eraseall +++ b/misc-utils/flash_eraseall @@ -1,4 +1,3 @@ #!/bin/sh -echo "${0##*/} has been replaced by \`flash_erase <mtddev> 0 0\`; please use it" 1>&2 [ $# -ne 0 ] && set -- "$@" 0 0 exec flash_erase "$@"
Well, flash_erase <mtddev> 0 0 is the same as flash_eraseall <mtddev>. But flash_eraseall is still more handy to use. Let's keep flash_eraseall as short cut and don't force users to use a less handy user interface. Signed-off-by: Richard Weinberger <richard@nod.at> --- misc-utils/flash_eraseall | 1 - 1 file changed, 1 deletion(-)