CD_PVD Domain/OS CD_PVD
NAME
cd_pvd, cd_cpvd - read Primary Volume Descriptor from CD-ROM
SYNTAX
#include <sys/cdrom.h>
int cd_pvd(path, pvd)
char *path;
struct iso9660_pvd *pvd;
int cd_cpvd(path, pvd)
char *path;
char *pvd;
DESCRIPTION
The function cd_pvd() fills the pvd structure with the contents of the
Primary Volume Descriptor from the CD-ROM. The declaration for struct
iso9660_pvd is contained in <sys/cdrom.h>. The path argument points to a
pathname that names a file or directory within a CD-ROM file hierarchy or
that names a block special file for a CD-ROM file system. To successfully
execute this function the user must have read or execute permission on
the file/directory pointed to by path.
The function cd_cpvd() copies the complete Primary Volume Descriptor as
recorded on the CD-ROM to the address pvd. The user must allocate
CD_PVDLEN bytes for the Primary Volume Descriptor. CD_PVDLEN is contained
in <sys/cdrom.h>.
RETURN VALUE
Upon successful completion the functions return a value of zero. In case
of an error, -1 is returned and errno is set to indicate the error.
ERRORS
The functions will fail if one or more of the following is true:
[EACCESS]
Search permission is denied for a component of the path
prefix. Read permission for the file or directory pointed
to by path or read permission for the block special file
pointed to by path is denied.
[ENAMETOOLONG]
The length of the path string exceeds {PATH_MAX} or a
pathname component is longer than {NAME_MAX} while
{_POSIX_NO_TRUNC} is in effect.
[ENOENT]
A component of path does not exist or the path
argument points to an empty string.
[EINVAL]
The named file is a block special file and the CD-ROM is not
recorded according to the ISO 9660 or the High Sierra Group
standards.
[ENOTDIR]
A component of the path prefix is not a directory.
[ENXIO]
The named file is a block special file and the device associated
with the special file does not exist.
The CD-ROM is not in the drive or a read error occured.
[EFAULT]
The address of pvd or path is invalid.
[EINTR]
A signal was caught during one of the functions.
[EMFILE]
{OPEN_MAX} file descriptors are currently open in the
calling process.
[ENFILE]
The system file table is full.