[ros-kernel] Removable Media Support is Broken.

James Tabor jimtabor at adsl-64-217-116-74.dsl.hstntx.swbell.net
Mon Jul 12 15:40:24 CEST 2004


Ok~
James Tabor wrote:
> Hi Hartmut!
> in disk.c I replaced DiskDeviceObject back for the Partition Read command.
> Now I can access the zip drives, but now I can not read the directorys.
> 
>   /* Read partition table */
> //  Status = IoReadPartitionTable(DiskDeviceExtension->PhysicalDevice,
> //                DiskDeviceExtension->DiskGeometry->BytesPerSector,
> //                TRUE,
> //                &PartitionList);
> //
>   /* Read partition table */
>   Status = IoReadPartitionTable(DiskDeviceObject,
>                 DiskDeviceExtension->DiskGeometry->BytesPerSector,
>                 TRUE,
>                 &PartitionList);
> 
> I tried PhysicalDevice once before and it did not work.
> Still Hacked,
stupid spell check, *Hacken*
> James

In disk.c DiskBuildPartitionTable() I had to do this,

       else
         {
//        DiskData->PartitionType = 0;
//        DiskData->PartitionNumber = 1;
//        DiskData->PartitionOrdinal = 0;
//        DiskData->HiddenSectors = 0;
//        DiskData->BootIndicator = 0;
//        DiskData->DriveNotReady = FALSE;
// DiskDeviceExtension->PartitionLength.QuadPart+=DiskDeviceExtension->StartingOffset.QuadPart;
//        DiskDeviceExtension->StartingOffset.QuadPart = 0;
         }
     }

Now, I can read and write, do directors bla bla bla.

This is still not right and I moved down deeper into the kernel.

(io/xhaldrv.c:716) xHalIoReadPartitionTable(c161a038 512 1 dedf5ab0)
(io/xhaldrv.c:778) PartitionOffset: 0
(io/xhaldrv.c:801) RealPartitionOffset: 0
(io/xhaldrv.c:817) Magic aa55
(io/xhaldrv.c:853) Disk signature: c0c9014e
(io/xhaldrv.c:877) Partition 3: Normal Partition
(io/xhaldrv.c:879) Logical Partition 0
(io/xhaldrv.c:927)  0: nr: 1 boot: 1 type: 6 start: 0x4000 count: 0x2cdfc000
(disk.c:922) Partition 00: nr: 1 boot: 1 type: 6 offset: 32 size: 1470432
(io/xhaldrv.c:716) xHalIoReadPartitionTable(c161a038 512 1 dedf5ab0)
(io/xhaldrv.c:778) PartitionOffset: 0
(io/xhaldrv.c:801) RealPartitionOffset: 0
(io/xhaldrv.c:817) Magic aa55
(io/xhaldrv.c:853) Disk signature: 73696420
(io/xhaldrv.c:716) xHalIoReadPartitionTable(c161a038 512 1 dedf5840)
(io/xhaldrv.c:778) PartitionOffset: 0
(io/xhaldrv.c:801) RealPartitionOffset: 0
(io/xhaldrv.c:817) Magic aa55
(io/xhaldrv.c:853) Disk signature: 73696420
(io/xhaldrv.c:716) xHalIoReadPartitionTable(c161a038 512 1 dedf57e0)
(io/xhaldrv.c:778) PartitionOffset: 0
(io/xhaldrv.c:801) RealPartitionOffset: 0
(io/xhaldrv.c:817) Magic aa55
(io/xhaldrv.c:853) Disk signature: 73696420
(io/xhaldrv.c:716) xHalIoReadPartitionTable(c161a038 512 1 dedf57e0)
(io/xhaldrv.c:778) PartitionOffset: 0
(io/xhaldrv.c:801) RealPartitionOffset: 0
(io/xhaldrv.c:817) Magic aa55
(io/xhaldrv.c:853) Disk signature: 73696420

The first partition read was good, but the 2nd, 3rd, 4th and 5th things go wrong
but do not fail. I guess after the first read it's the boot sector.
Any ideas why we read the partition table first than after that it is junk in
the buffer? 8^0
James


More information about the Ros-kernel mailing list