* [PATCH] flash_eraseall: Remove warning
@ 2016-04-26 20:03 Richard Weinberger
2016-04-27 8:21 ` Boris Brezillon
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2016-04-26 20:03 UTC (permalink / raw)
To: linux-mtd; +Cc: Richard Weinberger
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(-)
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 "$@"
--
2.7.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] flash_eraseall: Remove warning
2016-04-26 20:03 [PATCH] flash_eraseall: Remove warning Richard Weinberger
@ 2016-04-27 8:21 ` Boris Brezillon
2016-04-27 8:27 ` Richard Weinberger
0 siblings, 1 reply; 5+ messages in thread
From: Boris Brezillon @ 2016-04-27 8:21 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-mtd
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 "$@"
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] flash_eraseall: Remove warning
2016-04-27 8:21 ` Boris Brezillon
@ 2016-04-27 8:27 ` Richard Weinberger
2016-04-27 8:29 ` Boris Brezillon
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2016-04-27 8:27 UTC (permalink / raw)
To: Boris Brezillon; +Cc: linux-mtd
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] flash_eraseall: Remove warning
2016-04-27 8:27 ` Richard Weinberger
@ 2016-04-27 8:29 ` Boris Brezillon
2016-04-27 16:01 ` Brian Norris
0 siblings, 1 reply; 5+ messages in thread
From: Boris Brezillon @ 2016-04-27 8:29 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-mtd
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
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] flash_eraseall: Remove warning
2016-04-27 8:29 ` Boris Brezillon
@ 2016-04-27 16:01 ` Brian Norris
0 siblings, 0 replies; 5+ messages in thread
From: Brian Norris @ 2016-04-27 16:01 UTC (permalink / raw)
To: Boris Brezillon; +Cc: Richard Weinberger, linux-mtd
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-27 16:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 20:03 [PATCH] flash_eraseall: Remove warning Richard Weinberger
2016-04-27 8:21 ` Boris Brezillon
2016-04-27 8:27 ` Richard Weinberger
2016-04-27 8:29 ` Boris Brezillon
2016-04-27 16:01 ` Brian Norris
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.