On 03/21/2010 08:33 AM, Naphtali Sprei wrote:
-    if (ro == 1) {
+    if (media == MEDIA_CDROM) {
+        ro = 1;
+    }
+    if (ro == 1&&
+        media != MEDIA_CDROM) { /* CDROM is fine for any interface, don't 
check */
          if (type != IF_SCSI&&  type != IF_VIRTIO&&  type != IF_FLOPPY) {

Ug.  How about formatting this as

    if (media == MEDIA_CDROM) {
        /* CDROM is fine for any interface, don't check.  */
        ro = 1;
    } else if (ro == 1) {
        if (type != IF_SCSI ...)
    }

duplicating the MEDIA_CDROM test makes the logic harder to follow.


r~


Reply via email to