## Storage Device Driver Reference

[prev][next][parent][TOC]

### Removable Media

01h Check Media Change
11h Reset Media Change
0Fh Check for Removable Media
12h Get Logical Drive Map
13h Set Logical Drive Map
01h Check Media Change
11h Reset Media Change

01h - Check Media Change, 11h - Reset Media Change: When a Check Media Change packet has been received and the last unit status indicates that a media change has not occurred, then OS2DASD will send a request to the .ADD driver to get an updated status. If the current internal status indicates the media has changed, then "Changed" status will be returned.

OS2DASD retains the result of this call and monitors for a media change indication on other I/O operations.

When a Media Change is detected, the driver retains this information and blocks subsequent I/O requests to the unit until a Reset Media Change packet is received.

0Fh - Check for Removable Media: When OS2DASD receives the Check for Removable Media request, it locates the appropriate VolCB that corresponds to the requested unit number. The VolCB points to the corresponding UnitCB that contains the UnitInfo obtained from the .ADD driver. The BUSY bit of the request packet is set accordingly.

12h - Get Logical Drive Map, 13h - Set Logical Drive Map: OS/2 allows multiple drive letters to be assigned to the same removable device. This assignment occurs automatically for the B drive on a single diskette system and by way of the EXTDSKDD.SYS driver to create additional drive letter aliases for removable drives.

Only one drive letter at a time may be assigned to a removable drive from a set of drive letters that might potentially be mapped to the drive.

The binding of a specific unit number to a removable device is accomplished through the use of Set Logical Drive Map.

When OS2DASD receives the Set Logical Drive Map request, it looks up the physical removable device that should be assigned to this drive letter. It then updates its tables to indicate that the requested unit number owns the removable device.

When OS2DASD receives the Get Logical Drive Map request, it determines the physical drive associated with the unit number provided. OS2DASD then searches the VolCBs to determine which VolCB currently owns the removable device. This owning unit number is returned to the kernel.

The unit numbers returned on both of these packets must be 1-based rather than zero-based. A zero unit number returned indicates that there are no alias drive letters that can be assigned to the removable device.