reactos/drivers/storage/mountmgr
Hermès Bélusca-Maïto 7e89227a00
[MOUNTMGR] Fix initial sending of device online notification (#7030)
1. MountMgrMountedDeviceArrival():
   Fix the conditions under which the device's online notifications
   are skipped (SkipNotifications == TRUE) and fix the code comments.
   Now, things make much more sense:
   online notifications are skipped when the device is already offline
   or is a legacy (NT <= 4) fault-tolerant volume (see point 2 below),
   or is NOT mounted (doesn't have a drive letter).
   Previously, we were sending an online notification if the device
   was NOT mounted (why?!...) or if it was deemed as "valid" (wrongly
   determined, see point 2 below).

2. QueryDeviceInformation():
   * The usage of the "Valid" parameter didn't make much sense. Indeed,
     when a partition/volume device is reported to the Mount Manager,
     it's already valid. (Also, setting "Valid" to TRUE only in the case
     of an MBR partition while ignoring GPT ones, and resetting it to
     FALSE if IOCTL_STORAGE_GET_DEVICE_NUMBER returned success, pointed
     to something incorrect was going on.)
     Instead, what we are checking here is whether the device is a
     legacy fault-tolerant volume: such volume can only reside on an
     MBR disk, have the expected partition type, and does not really
     reside on a specific storage device (hence the check for
     IOCTL_STORAGE_GET_DEVICE_NUMBER returning failure).

   * Take also the opportunity to SAL2-ify the function.
2024-06-25 22:51:08 +02:00
..
CMakeLists.txt [MOUNTMGR] Move the driver to drivers/storage 2020-11-01 12:35:56 +03:00
database.c [MOUNTMGR] Rectify "NoAutoMount" usage (#7030) 2024-06-25 22:51:07 +02:00
device.c [MOUNTMGR] Rectify "NoAutoMount" usage (#7030) 2024-06-25 22:51:07 +02:00
mntmgr.h [MOUNTMGR] Fix initial sending of device online notification (#7030) 2024-06-25 22:51:08 +02:00
mountmgr.c [MOUNTMGR] Fix initial sending of device online notification (#7030) 2024-06-25 22:51:08 +02:00
mountmgr.rc [MOUNTMGR] Move the driver to drivers/storage 2020-11-01 12:35:56 +03:00
notify.c [MOUNTMGR] Introduce MountMgrSendSyncDeviceIoCtl() to replace repeated code (#6960) 2024-06-13 20:01:16 +02:00
point.c [MOUNTMGR] Move the driver to drivers/storage 2020-11-01 12:35:56 +03:00
symlink.c [MOUNTMGR] Introduce MountMgrSendSyncDeviceIoCtl() to replace repeated code (#6960) 2024-06-13 20:01:16 +02:00
uniqueid.c [MOUNTMGR] Move the driver to drivers/storage 2020-11-01 12:35:56 +03:00