reactos/drivers/storage/partmgr
Hermès Bélusca-Maïto 3d26d76a4c
[PARTMGR] Detect and flag partitionless ("super-floppy") disks (#6926)
CORE-15575

Detect whether the disk is a "super-floppy", which is the name given
to partitionless disk having no MBR, with the unique partition volume
starting at sector offset zero and spanning the whole disk.
The name comes from the fact that at the partitioning level, the disk
"looks like" a large-capacity floppy disk.

This is typically how external removable (USB, ...) drives are
partitioned by default by Windows.

https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-and-gpt-faq?view=windows-11#superfloppy

The kernel-mode functions IoReadPartitionTable() / IoWritePartitionTable()
report the drive layout of a "super-floppy" disk as follows:
an MBR-style disk containing only one single partition starting at the
beginning of the disk (StartingOffset == 0) without hidden sectors, and
its type being FAT16 non-bootable.
The disk NTFT signature is set to 0x00000001.

----

Additional bug fixes to make the feature work reliably:

- Make PartMgrGetDriveLayout() also update the FDO DiskData's
  PartitionStyle and Signature/GPT DiskId for consistency (code moved
  from PartMgrRefreshDiskData()).

- In FdoIoctlDiskSetDriveLayout[Ex](), if the disk is "super-floppy",
  but the user wants to create more than one partition, fail the call.
  (In the Ex call, fail also if the partition style changes.)
2024-06-12 12:15:22 +02:00
..
CMakeLists.txt [BOOTDATA] Fix boot (addendum to dd56e065bc) 2020-12-06 01:55:20 +03:00
debug.h [PARTMGR] Add the Partition Manager driver 2020-11-13 03:04:15 +03:00
guid.c [PARTMGR] Add the Partition Manager driver 2020-11-13 03:04:15 +03:00
partition.c [PARTMGR] Fix the way the "symlink -> target" DPRINT is displayed 2024-06-12 12:14:53 +02:00
partmgr.c [PARTMGR] Detect and flag partitionless ("super-floppy") disks (#6926) 2024-06-12 12:15:22 +02:00
partmgr.h [PARTMGR] Detect and flag partitionless ("super-floppy") disks (#6926) 2024-06-12 12:15:22 +02:00
partmgr.rc [PARTMGR] Add the Partition Manager driver 2020-11-13 03:04:15 +03:00
partmgr_reg.inf [PARTMGR] Add the Partition Manager driver 2020-11-13 03:04:15 +03:00
utils.c [PARTMGR] Add the Partition Manager driver 2020-11-13 03:04:15 +03:00