|
Mac OS 9
|
#include <DriverGestalt.h>
Data Fields | |
| UInt32 | vmOptions |
The DriverGestaltVMOptionsResponse is returned by a disk driver in response to a kdgVMOptions Driver Gestalt request. This allows a disk driver to tell VM a few things about a disk drive. For example:
� A drive that should never be in the page fault path should return kAllowVMNoneMask. Examples of this are drives that have manual eject buttons that are not disabled by software, drives with very slow throughput, or drives that depend on a network connection. � A drive that should never be written to but is safe for read-only file mapping should return kAllowVMReadOnlyMask. Examples of this are WORM drives where each write eats write-once space on the disk and CD-ROM drives which are read-only media. � A drive that should allow VM to create its main backing store file should return kAllowVMReadWriteMask. Examples of this are fast read/write drives that don't allow manual eject and don't use a network connection.
A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine what disk drive this call is for. This is a per-drive call, not a per-driver call.
The only three valid responses to kdgVMOptions at this time are kAllowVMNoneMask, kAllowVMReadOnlyMask, and kAllowVMReadWriteMask (i.e., setting only kAllowVMWriteBit is not valid).
Important: All bits not defined here are reserved and should be set to zero until they are defined for a specific purpose.
The kdcVMOptions Driver Configure _Control call provides the ability to change a driver's response to kdgVMOptions Driver Gestalt requests. A driver should return controlErr if it doesn't want to provide the ability to change the kdgVMOptions response. If a driver supports the kdcVMOptions Driver Configure _Control call, but is asked to set an option bit that it doesn't support (for example, if a read-only device is asked to set the kAllowVMWriteBit), it should return paramErr.