DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

cd_pvd(3X)


cd_pvd, cd_cpvd -- read CD-ROM Primary Volume Descriptor (PVD)

Synopsis

   cc [flag . . . ] file . . . -lcdfs -lgen [library] . . .
   

#include <sys/cdrom.h>

int cd_pvd(const char *path, struct iso9660_pvd *pvd);

int cd_cpvd(const char *path, char *pvd);

Description

cd_cpvd fills the pvd structure with the contents of the Primary Volume Descriptor associated with a file or directory referred to by path.

The PVD contains information that the manufacturer recorded on the CD-ROM disk, such as the location of the root directory, the block size, volume name and expiration date. Allocate CD_PVDLEN bytes for the PVD. To read the PVD, you need read or execute permission for path.


path
File or directory within the CD-ROM file system, or block special file containing the CD-ROM file system.

pvd
Pointer to the structure or character array where the Primary Volume Descriptor is to be copied. The character array must contain at least CD_PVDLEN bytes.

Return values

On success, cd_pvd returns a value of zero. On failure, cd_pvd returns a value of -1 and sets errno is set to identify 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 pvd or path.

EINTR
A signal was caught during the execution of the one of the functions.

EINVAL
path is a block special file and the CD-ROM is not recorded according to the ISO-9660 standard.

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 the special file does not exist.

ENXIO
The CD-ROM is not in the drive, or a read error occurred.

References

cdvd(1M), cd_svd(3X)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004