Author: cgutman
Date: Thu Feb 2 19:57:13 2012
New Revision: 55382
URL: http://svn.reactos.org/svn/reactos?rev=55382&view=rev
Log:
[USETUP]
- Write the partition table back after CheckActiveBootPartition() because it could've changed the partition table on a disk with no active partition
- Fixes issues installing ROS on new disks and disks with no active partitions (including USB disks)
Modified:
branches/usb-bringup-trunk/base/setup/usetup/interface/usetup.c
Modified: branches/usb-bringup-trunk/base/setup/usetup/interface/usetup.c
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/base/setup/us…
==============================================================================
--- branches/usb-bringup-trunk/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/base/setup/usetup/interface/usetup.c [iso-8859-1] Thu Feb 2 19:57:13 2012
@@ -3350,7 +3350,16 @@
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
+ /* Find or set the active partition */
CheckActiveBootPartition(PartitionList);
+
+ /* Update the partition table because we may have changed the active partition */
+ if (WritePartitionsToDisk(PartitionList) == FALSE)
+ {
+ DPRINT("WritePartitionsToDisk() failed\n");
+ MUIDisplayError(ERROR_WRITE_PTABLE, Ir, POPUP_WAIT_ENTER);
+ return QUIT_PAGE;
+ }
RtlFreeUnicodeString(&SystemRootPath);
swprintf(PathBuffer,
Author: janderwald
Date: Thu Feb 2 19:37:38 2012
New Revision: 55381
URL: http://svn.reactos.org/svn/reactos?rev=55381&view=rev
Log:
[USBSTOR]
- Add sanity checks
- Check if device needs CDB padding and return error in that case
Modified:
branches/usb-bringup-trunk/drivers/usb/usbstor/fdo.c
Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/fdo.c
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbstor/fdo.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/usb/usbstor/fdo.c [iso-8859-1] Thu Feb 2 19:37:38 2012
@@ -193,13 +193,29 @@
// Check that this device uses bulk transfers and is SCSI
//
InterfaceDesc = (PUSB_INTERFACE_DESCRIPTOR)((ULONG_PTR)DeviceExtension->ConfigurationDescriptor + sizeof(USB_CONFIGURATION_DESCRIPTOR));
+
+ //
+ // sanity check
+ //
+ ASSERT(InterfaceDesc->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE);
+ ASSERT(InterfaceDesc->bLength == sizeof(USB_INTERFACE_DESCRIPTOR));
+
DPRINT1("bInterfaceSubClass %x\n", InterfaceDesc->bInterfaceSubClass);
if (InterfaceDesc->bInterfaceProtocol != 0x50)
{
DPRINT1("USB Device is not a bulk only device and is not currently supported\n");
return STATUS_NOT_SUPPORTED;
}
-
+
+ if (InterfaceDesc->bInterfaceSubClass != 0x06)
+ {
+ //
+ // FIXME: need to pad CDBs to 12 byte
+ // mode select commands must be translated from 1AH / 15h to 5AH / 55h
+ //
+ DPRINT1("[USBSTOR] Error: need to pad CDBs\n");
+ return STATUS_NOT_IMPLEMENTED;
+ }
//
// now select an interface