lkml.org 
[lkml]   [1999]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ide-probe.c logic wrong?
> No, the current kernel code is correct.

Thanks for your detailed description, which justifies what the code
does to the kernel's variables.

However, I still see no justification for the circumstances in which
the warning message "cdrom or floppy?, assuming " is displayed ...

If type is being set to ide_cdrom, why should the presence of the
substring "oppy" in id->model cause the warning to be suppressed? This
seems counter-intuitive ... unless the presence of "oppy" in id->model
has already been tested for elsewhere and used to adjust drive->media?

Your explanation suggests that the code should read:


case ide_floppy:
if (!strstr(id->model, "CD-ROM") && drive->media != ide_cdrom)
{
if (!strstr(id->model, "oppy") &&
!strstr(id->model, "poyp") &&
!strstr(id->model, "ZIP"))
printk("cdrom or floppy?, assuming ");
printk ("FLOPPY");
break;
}
type = ide_cdrom; /* Early cdrom models used zero */
case ide_cdrom:


The original was:


case ide_floppy:
if (!strstr(id->model, "CD-ROM")) {
if (!strstr(id->model, "oppy") && !strstr(id->model,
"poyp") && !strstr(id->model, "ZIP"))
printk("cdrom or floppy?, assuming ");
if (drive->media != ide_cdrom) {
printk ("FLOPPY");
break;
}
}
type = ide_cdrom; /* Early cdrom models used zero */
case ide_cdrom:

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.054 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site