HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Architected Interface Facility: Operating System Reference Manual > Chapter 3 Architected Interface Descriptions

AIFMODISMOUNT

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Logically and physically dismounts previously mounted magneto-optical media from a magneto-optical drive.

Syntax



                   REC      I32       I32A      

AIFMODISMOUNT(overall_status, ldev, itemnum_array,

                   @64A        RECA         I32

                item_array, itemstatus_array, user_id)


Parameters

overall_status

record by reference (required)

Returns the overall status of the call. A zero indicates a successful call. A negative value indicates an error in the overall call, not specific to any particular item. A positive value indicates the last element in itemstatus_array, signaling an error condition. Refer to appendix A for meanings of status values.

Record type: status_type (Refer to appendix B.)

ldev

32-bit signed integer by value (required)

The logical device number (ldev) of the optical drive to dismount.

itemnum_array

32-bit signed integer array by reference (optional)

This is an array of integers, terminated by an element containing the value zero, used to define the corresponding option given in the item_array parameter. If this optional parameter is specified, the item_array parameter and the itemstatus_array parameter must both be supplied.

Default: nil

item_array

64-bit address array by reference (optional)

An array with the same number of elements as the itemnum_array parameter, each of which is a globalanyptr that points to the appropriate type needed by each particular item number. The value used for each option is taken from, or returned to, the location pointed to by the globalanyptr in this array. When this parameter is supplied, the itemnum_array parameter and the itemstatus_array parameter must both be supplied.

Array type: globalanyptr (Refer to Appendix B.)

Default: nil

itemstatus_array

record array by reference (optional)

If problems are detected with the specific items, an error status is placed in the corresponding element of this array for each item with an error. The overall_status parameter indicates whether any individual items contained errors, and the element of the last detected error. This array must contain as many elements as are contained in the itemnum_array and the item_array parameters.

A zero indicates a successful operation. A negative value indicates an error condition. A positive value indicates a warning.

Array type: status_type (Refer to Appendix B.)

Default: nil

user_id

32-bit signed integer by value (optional)

The user ID assigned to a vendor at the time of purchase of the Architected Interface Facility: Operating System product. If it is not passed, the caller must have previously called AIFACCESSON.

Default: 0

Operation Notes

AIFMODISMOUNT provides a way to dismount magneto-optical media that has been previously mounted. Volume management is called to close the volume set. Closing the volume set, dismounts it from the active system volume sets. All files on the volume set must be closed in order for the dismount to succeed. When a dismount occurs, the media is removed to the original media storage slot; an unoccupied storage slot if the original storage slot is occupied; or the original mail slot if no storage slot is currently unoccupied. If the media originally came from a mail slot when it was mounted, it will be returned to that mail slot when dismounted. If the pin item is not specified an attempt is made to dismount the media on behalf of the calling process.

It is recommended that all files be closed on the volume set, prior to calling AIFMODISMOUNT. If files are still open on the volume set when AIFMODISMOUNT is called, an error is returned (-17016) and the volume set is left in a 'close pending' state. When the last file on the volume set is closed, Volume Management closes the volume set and it is left in a 'LONER' state. Note, it is NOT physically removed from the drive. In order to get it physically removed, you must allocate the drive (if you do not currently have it allocated), and perform the dismount again. Mounting another piece of media will also physically remove the media from the drive (mounting causes an implicit dismount).

If an item is specified more than once in a call to this AIF, the first occurrence of it will be used. For example, if item 17401 (Pin) is passed in twice, the first pin value that is passed is used to perform the dismount, and the 2nd pin value is ignored (a warning will be returned in the item status array).

Refer to the Programming Example in Appendix C, or the AIFMOMOUNT Operation Notes for more information.

AIFMODISMOUNT Item Descriptions

The following table provides detailed descriptions of item numbers and corresponding items associated with AIFMODISMOUNT.

Table 3-19 AIFMODISMOUNT Item Descriptions

Item NumberItem Name (Data Type) Release First Available Description
17401

Pin (I32) Release 5.0

Passes the pin for the process that allocated the specified optical drive. This is used for verification of ownership for an optical media drive. If 0 is passed, the pin of the calling process is used.

Default: Pin of the calling process

17402

Nowait identifier (I32) Release 5.0

When a 0 is passed specifying 'initiation', the call to this AIF will initiate the dismount but will return before it completes. A unique non-zero identifier is returned and must be used in a second call to AIFMODISMOUNT to complete the dismount request.

Note, the process that 'initiates' the dismount must be the process that 'completes' the dismount. For example, the following will fail with an error: Process 1 calls AIFMODISMOUNT with the nowait item set to the value 0. Process 2 passes the pin item with the value 1 (for Process 1) and calls AIFMODISMOUNT with the nowait item set to the identifier returned from the previous AIFMODISMOUNT. The second call to AIFMODISMOUNT will fail with an error, since Process 2 did NOT 'initiate' the mount.

Also, any errors that occur during the actual dismount of the media are not returned until you 'complete' the dismount.

This item allows the user to initiate a dismount request and to have control returned before completion of the dismount.

When the second call to AIFMODISMOUNT is made to complete the mount, that is a non-zero value for the nowait identifier is passed, the ldev parameter is ignored. In addition, any items that are passed are ignored.

The maximum number of nowait requests per process is 32. That is, only 32 nowait requests can be outstanding from both AIFMOMOUNT and AIFMODISMOUNT at any one time.

Default: Dismount is performed before returning to user

 

Feedback to webmaster