Hi,
I just noticed that in scsi_ioctl.c (Kernel 2.6.11.7), there are fallthroughs
in the sshdr.sense_key switch (Line 124 and beyond):
[...]
case NOT_READY: /* This happens if there is no disc in drive */
if (sdev->removable && (cmd[0] != TEST_UNIT_READY)) {
printk(KERN_INFO "Device not ready. Make sure"
" there is a disc in the drive.\n");
break;
}
***** ---> Fallthrough there is device is not removeable or command is not TEST_UNIT_READY
case UNIT_ATTENTION:
if (sdev->removable) {
sdev->changed = 1;
sreq->sr_result = 0; /* This is no longer considered an error */
break;
}
***** ---> Fallthrough there is device is not removeable
default: /* Fall through for non-removable media */
[...]
I was wondering if this is intentional and if yes, this should be
clearly marked as such (The usual /* FALLTHROUGH */). If this is
intentional, then the logic in this statement is seriously in need of
documentation... :-)
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
[email protected] +49 9131 50 654 0 http://www.intermeta.de/
RedHat Certified Engineer -- Jakarta Turbine Development -- hero for hire
Linux, Java, perl, Solaris -- Consulting, Training, Development
"Now you can start with implementation and integration and do the
requirements later". -- Prof. Dr. Dr. h.c. Manfred Broy about the new
german federal software development standard "V-Model XT"
(found at http://de.biz.yahoo.com/050207/299/4en0t.html)