Assigns a logical name to a physical device. Any task that uses this system call loses its device independence. Only a few selected tasks should perform all device attaching and detaching.
CALL rq$logical$attach$device (log_name_ptr, dev_name, file_driver, except_ptr);
rq_logical_attach_device (log_name_ptr, dev_name, file_driver, except_ptr);
| Parameter | PL/M Data Type | C Data Type |
| log_name_ptr | POINTER | STRING far * |
| dev_name | POINTER | STRING far * |
| file_driver | BYTE | UINT_8 |
| except_ptr | POINTER to WORD_16 | UINT_16 far * |
log_name_ptr
A pointer to a STRING of 12 or fewer characters, possibly delimited with colons, that contains the logical name to be assigned to a device. The OS removes the colons so that a logical name with colons is the same as one without; :F0: is the same as F0. Colons do not count in the length of the name. When you subsequently use this name in other system calls, specify colons.
dev_name
A pointer to a STRING containing the device name to which the logical name is assigned. This is the name of a Device-Unit Information Block (DUIB) specified during system configuration. For all file types except NFS, device names longer than 14 characters are truncated by the call to 14 characters.
See also:attachdevice, Command Reference,
for ICU-configurable systems, Logical Names screen, ICU User's Guide and Quick Reference
file_driver
Specifies which type of BIOS file driver to use with the device:
| Value | File Driver |
| 1 | Physical |
| 2 | Stream |
| 3 | DOS |
| 4 | Named |
| 5 | Remote |
| 6 | EDOS |
| 7-max | Loadable file drivers, including NFS. The IDs can vary, depending on which driver is loaded first. To find what ID is currently assigned to a specific loadable driver, first call rq_get_file_driver_status. |
except_ptr
A pointer to a variable declared by the application where the call returns a condition code.
This system call creates a logical device object that corresponds to a physical device. This logical device object is cataloged in the root object directory under the logical name pointed to by log_name_ptr. The logical device object must be cataloged before the EIOS can make connections to files on the device.
The first EIOS call that uses the logical name as a prefix in a pathname causes the physical device to be attached. The logical name can be used as a prefix in other system calls and can be deleted by logical_detach_device.
The EIOS uses the BIOS call a_physical_attach_device. Some condition codes that result because of errors in logical_attach_device are not returned until the EIOS tries to attach the device with a_physical_attach_device.
Depending on your system configuration, if the first attempt to attach the device fails, the EIOS will try again. The EIOS will continue trying to attach the device until the device is attached successfully or the configured number of retries has been reached.
See also:BIOS call a_physical_attach_device,
For ICU-configurable systems, RPA parameter, ICU User's Guide and Quick Reference
| E_OK | 0000H | No exceptional conditions occurred. |
| E_CONTEXT | 0005H | The root object directory already contains an entry with the name pointed to by the log_name_ptr parameter. |
| E_LIMIT | 0004H | At least one of these is true:
·The calling task's job object directory is full. ·The root object directory is full. ·The calling task's job is not an I/O job. |
| E_MEM | 0002H | The memory available to the calling task's job is not sufficient to complete this call. |
| E_LOG_NAME_SYNTAX | 0040H | The specified logical name is incorrect. At least one of these is true:
·The STRING pointed to by the log_name_ptr parameter is length 0 or greater than 12 characters. ·The logical name contains invalid characters. |
| E_NOT_CONFIGURED | 0008H | This system call is not part of the present configuration. |