Lines Matching defs:device

36  *  Contains functions that deal with the device table and are not for
40 * _opendevtab() Opens the device table for commands
41 * _setdevtab() Rewinds the open device table
42 * _enddevtab() Closes the open device table
43 * _getdevtabent() Gets the next entry in the device table
44 * _freedevtabent() Frees memory allocated to a device-table entry
45 * _getdevrec() Gets a specific record from the device table
46 * _devtabpath() Get the pathname of the device table file
103 * to see if the two structures describe the same device.
107 * and minor device numbers (i.e. "mknod"s for the same
108 * device), it's the same device.
111 * TRUE if the two structures describe the same device
125 * If they are described by the same inode on the same device,
128 * device type and major and minor device numbers.
148 * This function rewinds the open device table so that the next
149 * _getdevtabent() returns the first record in the device table.
159 /* If the device table file is open, rewind the file */
169 * This function closes the open device table. It resets the
170 * open device table external variable to NULL.
180 /* If the device table file is open, close it */
386 * and puts it in the device-table record buffer (whose address is in
398 * device table file
515 * Get the pathname of the device table
520 * Returns the pathname to the device table of NULL if
555 * Use the standard device table.
573 * The _opendevtab() function opens a device table for a command.
580 * TRUE if it successfully opens the device table file, FALSE otherwise
590 char *devtabname; /* Ptr to the device table name */
659 * This function returns the next entry in the device table.
660 * If no device table is open, it opens the standard device table
666 * Pointer to the next record in the device table, or
688 /* Open the device table if it's not already open */
728 /* Extract the device alias */
740 /* Extract the character-device name */
755 /* Extract the block-device name */
826 * This function frees space allocated to a device table entry.
881 * struct devtabent *_getdevrec(device)
882 * char *device
885 * contains the information in the device-table entry that describes
886 * the device <device>.
888 * The device <device> can be a device alias, a pathname contained in
890 * or a pathname to a device described using the "cdevice", "bdevice",
896 * char *device A character-string describing the device whose record
897 * is to be retrieved from the device table.
900 * A pointer to a structure describing the device.
909 _getdevrec(char *device) /* The device to search for */
915 struct stat64 devstatbuf; /* Stat struct, <device> */
923 * Search the device table looking for the requested device
929 if ((device != NULL) && !_validalias(device)) {
933 if (strcmp(device, devrec->cdevice) == 0) found = TRUE;
935 if (strcmp(device, devrec->bdevice) == 0) found = TRUE;
937 if (strcmp(device, devrec->pathname) == 0) found = TRUE;
942 * If the device <device> wasn't named explicitly in the device
944 * system, major device number, and minor device number
950 /* Status the file <device>. If fails, invalid device */
951 if (stat64(device, &devstatbuf) != 0) errno = ENODEV;
955 * If <device> is a block-special device. See if it is
957 * and major/minor device numbers against the
958 * file-system and major/minor device numbers of the
978 * If <device> is a block-special device. See if it is
980 * and major/minor device numbers against the
981 * file-system and major/minor device numbers of the
1001 * If <device> is neither a block-special or character-
1002 * special device. See if it is in the table by
1004 * device numbers against the file-system and
1005 * major/minor device numbers of the "pathname" entries.
1029 } /* End case where stat() on the <device> succeeded */
1031 } /* End case handling pathname not explicitly in device table */
1033 } /* End case handling <device> as a fully-qualified pathname */
1037 * Otherwise the device <device> is an alias.
1039 * the value <device>.
1044 if (!devrec->comment && (device != NULL) &&
1045 strcmp(device, devrec->alias) == 0)