win-pvdrivers

changeset 444:3a2121285fc9

Fixed bug in CD/DVD emulation where the backend device reports a block size of 512.
author James Harper <james.harper@bendigoit.com.au>
date Fri Nov 07 11:09:17 2008 +1100 (2008-11-07)
parents a572b7333267
children f99bd17ed79f
files xenvbd/xenvbd.c
line diff
     1.1 --- a/xenvbd/xenvbd.c	Thu Nov 06 11:19:22 2008 +1100
     1.2 +++ b/xenvbd/xenvbd.c	Fri Nov 07 11:09:17 2008 +1100
     1.3 @@ -253,6 +253,11 @@ XenVbd_InitFromConfig(PXENVBD_DEVICE_DAT
     1.4      KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
     1.5      return SP_RETURN_BAD_CONFIG;
     1.6    }
     1.7 +  if (xvdd->device_type == XENVBD_DEVICETYPE_CDROM)
     1.8 +  {
     1.9 +    /* CD/DVD drives must have bytes_per_sector = 2048. */
    1.10 +    xvdd->bytes_per_sector = 2048;
    1.11 +  }
    1.12  
    1.13    /* for some reason total_sectors is measured in 512 byte sectors always, so correct this to be in bytes_per_sectors */
    1.14  #ifdef __MINGW32__