For some computer platforms the SCSI2Pi default mode page data might not be suitable. They might not match the expectations of a driver, especially for exotic platforms, or a required mode page may be missing. In addition, mode page 0 is vendor-specific: it can have any content and format so that there cannot even be a meaningful default.
In order to address this, mode page data shall be made configurable. The current default data shall be kept, so that there is no change in behavior unless mode page data are explicitly overridden, additional mode pages are added or default mode pages are removed.
Providing mode page data on the command line is possible but inconvenient. It is better to use a property file (see #15) that contains a mapping of custom mode page data to the vendor and product INQUIRY data of a device. The revision field shall not be taken into account.
In this excample the data to be returned as mode page 0 for the specified device are 04020304ff. These data contain the page code, the page size and the mode page payload. s2p shall validate this format. (See the SCSI specification for details.) Mode page 0 uses a free format, i.e. there is not necessarily a length field.
The INQUIRY product name in the property key is optional, i.e.
mode_page.40.IBM=28040380beff
returns the specified data for mode page 40 for all IBM drives.
It shall also be possible to remove an existing (default) mode page from the list of supported mode pages. This is just in case there are platforms that do not work the default mode pages but work without them. Not specifying any mode page data shall remove the respective page, e.g.
For some computer platforms the SCSI2Pi default mode page data might not be suitable. They might not match the expectations of a driver, especially for exotic platforms, or a required mode page may be missing. In addition, mode page 0 is vendor-specific: it can have any content and format so that there cannot even be a meaningful default. In order to address this, mode page data shall be made configurable. The current default data shall be kept, so that there is no change in behavior unless mode page data are explicitly overridden, additional mode pages are added or default mode pages are removed.
Providing mode page data on the command line is possible but inconvenient. It is better to use a property file (see #15) that contains a mapping of custom mode page data to the vendor and product INQUIRY data of a device. The revision field shall not be taken into account.
e.g.
In this excample the data to be returned as mode page 0 for the specified device are 04020304ff. These data contain the page code, the page size and the mode page payload. s2p shall validate this format. (See the SCSI specification for details.) Mode page 0 uses a free format, i.e. there is not necessarily a length field. The INQUIRY product name in the property key is optional, i.e.
returns the specified data for mode page 40 for all IBM drives.
It shall also be possible to remove an existing (default) mode page from the list of supported mode pages. This is just in case there are platforms that do not work the default mode pages but work without them. Not specifying any mode page data shall remove the respective page, e.g.