CD_PTREC Domain/OS CD_PTREC
NAME
cd_ptrec, cd_cptrec - read Path Table Record from CD-ROM
SYNTAX
#include <sys/cdrom.h>
int cd_ptrec(path, ptrec)
char *path;
struct iso9660_ptrec *ptrec;
int cd_cptrec(path, ptrec)
char *path;
char *ptrec;
DESCRIPTION
The function cd_ptrec() fills the ptrec structure with the contents of
the Path Table Record, which is referred to by the argument path. The
argument path points to a directory within the CD-ROM file hierarchy. The
declaration for struct iso9660_ptrec is contained in <sys/cdrom.h>.
The cd_cptrec() function copies the Path Table Record as recorded on the
CD-ROM to the address ptrec. The user must allocate CD_MAXPTRECL bytes
for the Path Table Record. CD_MAXPTRECL 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 directory 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 argument path points to a file/directory not within
the CD-ROM file hierarchy.
[ENOTDIR]
A component of the path prefix is not a directory.
[ENXIO]
The CD-ROM is not in the drive or a read error ocurred.
[EFAULT]
The address of ptrec 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.