Content-type: text/html
cd_pvd, cd_cpvd - Reads the Primary Volume Descriptor from a CD-ROM
Rock Ridge and X/Open Extensions to the CDFS library (libcdrom.so, libcdrom.a)
#include <sys/cdrom.h>
int cd_pvd (
char *path,
struct iso9660_pvd *pvd );
int cd_cpvd (
char *path,
char *addr );
The function cd_pvd fills the *pvd structure with the contents of the Primary Volume Descriptor from the CD-ROM. To execute this function successfully, the user must have read or execute permission for the file or directory pointed to by *path
The function cd_cpvd copies the complete Primary Volume Descriptor that is recorded on the CD-ROM to the address pointed to by *addr. The user must allocate {CD_PVDLEN} bytes for the Primary Volume Descriptor. The variable {CD_PVDLEN} is defined in cdfs/xcdr.h, an include file that is called into sys/cdrom.h.
If successful,
the value zero
is returned.
If unsuccessful,
the integer
-1 is returned
and
errno
is set to
indicate the error.
The function will fail if:
Search permission is denied for a directory in
*path
or
read permission
is denied
for the
file,
directory,
or block special file
pointed to by
*path.
The address of
*path
or
*pvd
is invalid.
A signal was caught during execution of the function.
The argument
*path
points to a file or directory that is
not within the
CD-ROM
file hierarchy.
The named file is a block special file and the CD-ROM
is not recorded according to the
ISO 9660 standard.
{OPEN_MAX}
file descriptors
are currently open in
the calling process.
Files: cdfs/xcdr.h, sys/cdrom.h.
delim off