cddevsuppl(1M)


cddevsuppl -- set or get major and minor numbers of a CD-ROM device file

Synopsis

cddevsuppl [-m mapfile | -u unmapfile] [-c]

Description

cddevsuppl sets or gets the major and minor number of any or all of the device files so the appropriate device on the host system is accessed. The major and minor number of a device file on a CD-ROM are assigned by the CD-ROM publisher during manufacturing. These values may not match the major and minor numbers assigned to the physical devices on the host system. Only a privileged user can set the major/minor number assignments of a device file.

Mappings should be established before affected device files are used. Any device files that are in use and have their mappings changed by the cddevsuppl utility will continue to use the previous mappings until they are closed.

With no options cddevsuppl returns the current major/minor number assignments of all of the device files on the mounted CD-ROM.

Command options

The following options are available:

-m mapfile
Sets the major and minor number for the device files, as specified in mapfile. mapfile has one entry for each device file to be set. CD_MAXDMAP specifies the maximum number of device mappings that mapfile may contain. Each field in mapfile is separated by white space (tab, space), and each entry is separated by a new line. Anything beyond the third field on a line is considered to be a comment. The format for an entry in mapfile is:
   device_file_path  new_major_number  new_minor_number

-u unmapfile
Unsets the major and minor number assignment for the device files specified in unmapfile. (The default major/minor number assignments for the device file as recorded on the CD-ROM are then used.) The unmapfile file has one entry for each device file assignment. Each entry is separated by a new line. Anything beyond the first field on a line is considered to be a comment.

The format for an entry in unmapfile is:

   device_file_path

-c
Causes cddevsuppl to continue processing file entries even if an error occurs for an individual entry. The default action is to stop processing. The -c option is used with the -m mapfile or -u unmapfile options.

An error message for the specific device file is printed to standard error.

Usage

The -m and -u options are mutually exclusive.

When the CD-ROM is unmounted, any new major and minor number assignments are voided.

If the major and minor number settings of a device file are reset, previous settings are overridden.

The maximum number of device files per CD-ROM that can be reset is defined in the header file sys/cdrom.h.

Exit codes

If the -m option successfully completes, the new major/minor number settings are output to standard error.

If the -u option successfully completes, the major/minor numbers for the device files recorded on the CD-ROM are displayed.

cddevsuppl exits with one of the following values:


0
Successful completion

1
File is not found.

1
File is not a file or directory within a CD-ROM file hierarchy.

1
Access is denied.

2
Not a user with appropriate privileges. The user must have read/write permission for the device file to change the major/minor settings of the device file and must have read permission to see the settings.

3
Too many assignments

4
Parameter error.

4
Bad format in mapfile or unmapfile.

5
File is not a device file.

6
A device file listed in unmapfile (specified with the -u option) was not previously set.

References

cdsuf(1M), cd_setdevmap(3X), cd_suf(3X), environ(5)

Rock Ridge Interchange Protocol from Rock Ridge Technical Working Group


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004