|
|
Provides an application interface to create a streams, fifo, and device link
file.
Syntax
CA I32V I32V I32
HPDEVCREATE (pathname, path_syntax, path_length, status,
I32V *
[,itemnum, item] [...]);
Parameters
- pathname
32-bit pointer to a packed array of characters (required)
The name of the device file to be created. If the
path_length does not indicate the length of the
pathname, the device file name is assumed to be
terminated with a null.
- path_syntax
32-bit integer by value (optional)
Indicates the syntax of the name in the pathname
parameter. The valid values are:
- 0
MPE Escaped Syntax
- 1
MPE Only Syntax
- 2
POSIX Syntax
A value other than those listed above results in an error. The default
value is 0 (MPE escaped syntax). MPE escaped syntax allows a name to be
expressed in either MPE or POSIX syntax.
- path_length
32-bit integer by value (optional)
Indicates the length of the name in the pathname
parameter. A positive value is taken as the exact length of the name,
excluding any terminating characters.
If an invalid character is found in the pathname, an
error is returned. Passing a -1 value indicates that the length of the
name is unknown. HPDEVCREATE parses the name in the
pathname parameter until it finds either a terminating
character, an invalid character, or the name is 1023 characters. Passing
a value of zero indicates a null or empty name will result in an error.
Passing a negative value other than -1 will result in an error.
Default is -1.
- status
32-bit integer by reference (optional)
Returns an indication of the success or failure of the intrinsic call.
If no errors or warnings occur, status returns 32-bits of
zero.
If errors or warnings occur, status is interpreted as two 16-bit
fields:
- Bits (0:16)
Comprise status.info. A negative value indicates an
error condition, and a positive value indicates a warning
condition.
- Bits (16:16)
Comprise status.subsys. The value represents the
subsystem that sets the status information. For
HPDEVCREATE intrinsic, the subsystem is File System
(143).
If the status parameter is not specified and an
error occurs during the processing of HPDEVCREATE call,
the calling process aborts.
- itemnum
32-bit integer by value (optional)
Specifies a item number value used in combination with the corresponding
item parameter. Specifies the type of device file options used to
create a device file. Up to 32 itemnum/item pairs may be
specified in a call to HPDEVCREATE. The following table lists
the defined itemnum/item pairs. Specifying an
itemnum other than those below will result in a error.
If duplicate itemnums are specified in a call to
HPDEVCREATE, the last itemnum is used, and
a warning is returned to the caller.
If no itemnum/item pairs are
specified, an error is returned.
- item
Type varies by reference (optional)
The item parameter is matched with its corresponding
itemnum to pass information to HPDEVCREATE. If
an itemnum is specified and the item is
not present, an error will occur.
Table 7-12 HPDEVCREATE Keywords/keyvalues
item num |
Type |
Description |
0 | None | End of option list.
There is no corresponding item. Terminates the itemnum/item list
and is equivalent to not passing a itemnum/item pair. |
1 | I32 | Device File Category.
This option allows you to create one of several types of device files.
The following is a list of valid categories:
- 1
FIFO
Specifying this category creates a FIFO file. You can specify the ACD
option with this item number. Any other option will result in an
error.
- 2
STREAMS
Specifying this category creates a STREAMS file using the attributes
specified in the major number (item 3), minor number (item 4), and the
link name (item 5). If this category is specified, then the major or
minor number options are required.
- 3
DEVICE LINK
Specifying this category creates a device_link file using the LDEV
number specified in item 2 (LDEV). If you specify this category, then
item 2 is required.
|
2 | I32 | LDEV
Specifying this option causes a logical symbolic link to a device created
using the LDEV numbet provided in the keyvalue parameter. This option is
only valid when the device file category 3 (device link) is specified. If
other options are specified, an error is returned. |
3 | I32 | Major Number.
This option allows specifications of device files in a traditional UNIX
manner of major and minor numbers. If the major number is specified, the
minor number option must also be specified, or an error is returned.
The following major numbers are valid:
- 1-254
Used to indicate a streams device file.
Specifying a major number value other than 1-254 will result
in an error.
|
4 | I32 | Minor Number.
This option is used in conjunction with option 3 to provide UNIX compatible
device specification. If the minor number is specified, the major number
must be specified, or an error is returned. The interpretation of the minor
number is dependent on the value of the major number. The minor number
represents a streams connection to a driver.
A minor number is valid in the range from 0 to 16777215 (represented by
24 bits). |
5 | CA | Link Name.
This option may be used with the major and minor number options (3 and 4)
when a streams device is being created. An error is returned if this option
is specified with any device file category other than STREAMS.
The maximum size of this option is 8 characters (from the NMMGR link
screen). A character placed in the first element designates the delimiter
used to search to the end of the character array. For example:
%linkname% (% is the delimiter)
|
6 | BA | Access Control Definition (ACD):
Passes a byte array defining the access control definition (ACD) to be
attached to the streams or FIFO file. The array has a length of 1 to 279
bytes. This option expects a trailing carriage return character as a
delimiter. For example:
(X:@.@;R,W:JOE.SYS;RACD:SUE.SMITH)<cr>
The <cr> is the carriage return character (13,0x0D).
An error is returned if this item is specified when creating a device_link
file. |
Operation Notes
When creating a device link, you are creating a symbol to
a device with its default configuration parameters.
Related Information
None
|