cd_type(3X)
cd_type --
get CD-ROM format identification
Synopsis
cc [flag . . . ] file . . . -lcdfs -lgen [library] . . .
#include <sys/cdrom.h>
int cd_type(const char *path);
Description
cd_type determines the type of a CD-ROM
and indicates the CD-ROM type in the return value.
path-
File or directory within the CD-ROM file system,
or block special file containing the CD-ROM file system.
Return values
On success, cd_type returns one of the following values:
CD_IS09660-
The CD-ROM is recorded according to ISO-9660.
CDFS_HIGH_SIERRA-
The CD-ROM is recorded according to High Sierra.
CDFS_UNDEF_FS_TYPE-
The CD-ROM is recorded according to an unknown specification.
On failure, cd_type returns -1 and sets errno
to indicate the error as follows:
EACCES-
Search permission is denied on a component of path,
or read permission is denied on the file,
directory, or block special file that is pointed to by path.
EFAULT-
Invalid address of path.
EINVAL-
path points to a file or directory that is outside
the CD-ROM file system.
EMFILE-
The maximum number of file descriptors are open.
ENAMETOOLONG-
The size of path exceeds MAXPATHLEN,
or the component of a path name is longer than
MAXNAMELEN while _POSIX_NO_TRUNC is in effect.
ENFILE-
The system file table is full.
ENOENT-
path does not exist or
the path argument points to an empty string.
ENOTDIR-
A component of path is not a directory.
ENXIO-
path is a block special file and
the device associated with it does not exist.
ENXIO-
The CD-ROM is not in the drive or a read error occurred.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004