Re: `mke2fs' in partition_config.c
In <[🔎] 200001311948.NAA01177@cafe.onshore.com>,
at Date: Mon, 31 Jan 2000 13:48:11 -0600,
on Subject: Re: `mke2fs' in partition_config.c ,
Adam Di Carlo <adam@onshore.com> writes:
> send me a unified diff patch to fix the problem and I'll apply it?
I am not assure which is the better:
A: mke2fs should not use -c (badblock check) unless verbose flag
is specified to dbootstrap.
B: mke2fs should use -c (badblock check) unless verbose flag
is specified to dbootstrap.
If A, then patch is just
--- ../../../cvs/boot-floppies/utilities/dbootstrap/partition_config.c Tue Feb 1 09:35:57 2000
+++ ./utilities/dbootstrap/partition_config.c Tue Feb 1 13:25:16 2000
@@ -254,7 +254,7 @@
}
cflag = get_cflag(p->name);
- if (! bootargs.isquiet ) {
+ if (cflag && ! bootargs.isquiet ) {
sprintf(prtbuf,_("You have chosen to initialize %s as a Linux \"ext2\" filesystem. This will permanently erase any data on this partition. Are you sure you want to do this?"),
p->name);
if (yesNoBox(prtbuf, _("Are You Sure?")) == DLG_NO)
But if B, then
--- ../../../cvs/boot-floppies/utilities/dbootstrap/partition_config.c Tue Feb 1 09:35:57 2000
+++ ./utilities/dbootstrap/partition_config.c Tue Feb 1 13:27:28 2000
@@ -227,10 +227,8 @@
static int get_cflag (const char *name) {
struct stat statbuf;
- if (! NAME_ISEXE("/sbin/badblocks", &statbuf) ||
- ! bootargs.isverbose ) {
- return 0;
- }
+ if (! NAME_ISEXE("/sbin/badblocks", &statbuf)) return 0;
+ if ( ! bootargs.isverbose ) return 1;
sprintf(prtbuf, _("The system can scan the entire partition for un-readable disk blocks and will mark any such bad blocks it finds so that they will not be used. This requires that every block be read, and thus could take a long time, but may save you trouble later.\n\nShould the bad-block scan be performed on %s ?"), name);
return yesNoBox(prtbuf, _("Scan for Bad Blocks?"));
@@ -254,7 +252,7 @@
}
cflag = get_cflag(p->name);
- if (! bootargs.isquiet ) {
+ if (cflag && ! bootargs.isquiet ) {
sprintf(prtbuf,_("You have chosen to initialize %s as a Linux \"ext2\" filesystem. This will permanently erase any data on this partition. Are you sure you want to do this?"),
p->name);
if (yesNoBox(prtbuf, _("Are You Sure?")) == DLG_NO)
The reason to omit badblock checking is the consumed time ?
I am not very assured to cut this "-c" flag, because many user
around me did use this.
But I am not so strongly against to cut this, and
I will follow your decision. So please use the one which you like.
--
Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>
Reply to: