[PATCH [mtd-utils] 3/3] mkfs.ubifs: allow reformatting of devices
Ricard Wanderlof
ricard.wanderlof at axis.com
Fri May 10 03:07:53 EDT 2013
On Wed, 8 May 2013, Mike Frysinger wrote:
> Sometimes I want to re-initialize an existing ubifs, but the tool
> currently bails out if the volume is already formatted. Prompt the
> user instead so they can decide.
>
> Signed-off-by: Mike Frysinger <vapier at gentoo.org>
> ---
> ...
> {"root", 1, NULL, 'r'},
> @@ -142,6 +143,7 @@ static const struct option longopts[] = {
> {"max-leb-cnt", 1, NULL, 'c'},
> {"output", 1, NULL, 'o'},
> {"devtable", 1, NULL, 'D'},
> + {"yes", 0, NULL, 'y'},
> {"help", 0, NULL, 'h'},
> {"verbose", 0, NULL, 'v'},
> {"version", 0, NULL, 'V'},
> @@ -191,6 +193,7 @@ static const char *helptext =
> "-U, --squash-uids squash owners making all files owned by root\n"
> "-l, --log-lebs=COUNT count of erase blocks for the log (used only for\n"
> " debugging)\n"
> +"-y, --yes assume the answer is \"yes\" for all questions\n"
> ...
Wouldn't it be better to have a specific option for this specific case,
rather than a general yes-to-everything option? The latter makes sense
with programs such as fsck where the only prompt basically is 'I found a
fault, shall I fix it?', but in this is case it can be difficult to
predict the outcome should the option start to cover more potential
questions in the future.
-f and -F are already taken, but I was thinking something along the lines of:
"-T, --reformat format an existing ubifs even if already formatted"
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
More information about the linux-mtd
mailing list