[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [install report] 2.2.4-2000-01-03 (en) (A ToDo list)



Hi ! :)

In article <[🔎] oa3drgzg2v.fsf@arroz.fake>,
  at 29 Jan 2000 17:08:24 -0500,
    on Re: [install report] 2.2.4-2000-01-03 (en)  (A ToDo list),
 Adam Di Carlo <adam@onshore.com> writes:

>   /* Oflag:  1 == 2.0 compat; 0 == 2.2 only */

Ah, I see. I could forget that change from:

    sprintf(prtbuf, "mkfs.ext2 %s %s %s",( Oflag ? "-O none" : ""),
        ( cflag ? "-c" : ""),p->name);

to:

  sprintf(prtbuf, "mkfs.ext2 %s %s %s",( Oflag ? "" : "-O none"),
          ( cflag ? "-c" : ""), p->name);

This comment makes the meaning of this code clearer. Thanks.

> Thus, 2.0 compat is retained by default.

I agree to this.

> Any other comments?

In the next lines to this,

  cflag = get_cflag(p->name);
  if (! bootargs.isquiet ) {
    sprintf(prtbuf,_("You have chosen to initialize %s as a Linux \"ext2\" files
ystem. 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?")) )
      return 1;
  }

  sprintf(prtbuf, "mkfs.ext2 %s %s %s",( Oflag ? "" : "-O none"),
          ( cflag ? "-c" : ""), p->name);


I check boxes.c, and think that yesNoBox() returns 0 for "Yes", or -1 for "No".
If so, then

>    if (! yesNoBox(prtbuf,_("Are You Sure?")) )
>      return 1;

is correct ? Should we remove "!" in front of yesNoBox() here ?

Hmm. get_cflag() is in partition_config.c, and

static int get_cflag (const char *name) {
  struct stat statbuf;

  if (! NAME_ISEXE("/sbin/badblocks", &statbuf) ||
      ! bootargs.isverbose ) {
    return 0;
  }

  sprintf(prtbuf, _("The system can scan the entire partition for un-readable di
sk blocks and will mark any such bad blocks it finds so that they will not be us
ed. 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?"));
}

This seems that if bootargs.isverbose == 0, then get_cflag() returns 0.
Then, "if (! bootargs.isquiet ) {" is not enough, and this shoud be changed
to "if (! bootargs.isquiet  && cflag) {", or "if (bootargs.isverbose && cflag) {"
in:

  cflag = get_cflag(p->name);
  if (! bootargs.isquiet {
    sprintf(prtbuf,_("You have chosen to initialize %s as a Linux \"ext2\" files
ystem. This will permanently erase any data on this partition. Are you sure you 
want to do this?"),
            p->name);

Pleae check this too. Thanks.

-- 
  Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>


Reply to: