]> xenbits.xensource.com Git - pvdrivers/win/xenvbd.git/commitdiff
Ignore invalid devices
authorOwen Smith <owen.smith@citrix.com>
Tue, 20 Jan 2015 13:54:01 +0000 (13:54 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 20 Jan 2015 14:16:42 +0000 (14:16 +0000)
When a floppy drive is attached, the device id string cannot be parsed
into a valid xvd, sd? or hd? format. Report the error instead of asserting
and return the invalid value to ignore the device in question.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
src/xenvbd/fdo.c

index 68bf95c0384d3adc043f14b389d81024996db580..60d8cd901c14ac9b76a5ece9535186bc317f7cfb 100644 (file)
@@ -447,8 +447,8 @@ __ParseVbd(
         case 89:    return ((DeviceId & 0xC0) >> 6) + 14;   /* hdo..p */
         default:    break;
         }
-        ASSERT3U(DeviceId, ==, ~0);
     }
+    Error("Invalid DeviceId %s (%08x)\n", DeviceIdStr, DeviceId);
     return 0xFFFFFFFF; // OBVIOUS ERROR VALUE
 }
 static FORCEINLINE XENVBD_DEVICE_TYPE