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?
On Fri, 22 Jan 1999, Edmund GRIMLEY EVANS wrote:

> > 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:

I agree here. This code fragment is functionally the same as the
original, but it looks nicer with regards to the printk() of the warning
message.

Gadi

> 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.034 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site