Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (G)
Guardian Procedure Calls Reference Manual—522629-013
6-8
GETDEVNAME Procedure
(Superseded by DEVICE_GETINFOBYLDEV_
Syntax for TAL Programmers
Parameters
status returned value
INT
indicates the outcome of the call. The values of
status can be:
0 Successful; the name of the designated logical device is returned in
devname.
1 The designated logical device does not exist. The logical device number of the
next higher device is returned in
ldevnum; the name of that device is returned
in
devname.
2 There is no logical device with
ldevnum equal to or greater than ldevnum
which matches the
devtype and devsubtype parameters, if supplied.
4 The system specified could not be accessed.
99 Parameter error.
ldevnum input, output
INT:ref:1
is the logical device number at which an ascending search for a logical device is to
begin. If any of the optional
sysnum, devtype, and devsubtype parameters are
specified, only devices that match the specified parameters satisfy the search.
The range of valid logical device number input values is 0 through 65375.
You can also specify a starting value of 65535 to request a search starting with the
lowest-numbered logical device in the system. This alternative is equivalent to
specifying a starting value of 0, and is provided only for compatibility with previous
RVUs.
On return,
ldevnum receives the number of the first matching logical device, if one
exists. The
ldevnum remains unchanged if no such logical device exists. If
ldevnum is out of range on input, GETDEVNAME returns a status value of 2 (no
logical device exists whose logical device number is greater than or equal to
ldevnum) and ldevnum remains unchanged.
status := GETDEVNAME ( ldevnum ! i,o
,devname ! o
,[ sysnum ] ! i
,[ devtype ] ! i
,[ devsubtype ] ); ! i
Note. The calling program must treat ldevnum as unsigned. The following exception
exists for compatibility with previous RVUs.
It was formerly possible to request a search starting at the lowest logical device in the
system by passing any negative number in ldevnum. This functionality still exists, but the
negative number must be either -1 or the equivalent unsigned value (65535). An arbitrary
negative number is no longer accepted.