DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

cd_ptrec(3X)


cd_ptrec, cd_cptrec -- read CD-ROM Path Table Record

Synopsis

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

#include <sys/cdrom.h>

int cd_ptrec(const char *path, struct iso9660_ptrec *ptrec);

int cd_cptrec(const char *path, char *ptrec);

Description

cd_ptrec fills the ptrec structure with the contents of the Path Table Record associated with a directory which is referred to by the path argument.

cd_cptrec copies the complete Path Table Record as recorded on the CD-ROM to the address ptrec.


path
Points to a directory within the CD-ROM file hierarchy.

ptrec
Pointer to structure or character array where Path Table Record is to be copied. The characters must contain at least CD_MAXPTRECL bytes.

Return values

On success, the functions return a value of zero. On failure, the functions return -1 and set errno to identify the error as follows:

EACCES
Read permission is denied on the mount point, or search permission is denied on a component of path.

EFAULT
Invalid address of ptrec or path.

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

EINVAL
path points to a 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
path is not a directory.

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

REFERENCES

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