Open System Services Library Calls Reference Manual (G06.28+, H06.05+)

OSS Library Calls (n - r) realpath(3)
NAME
|
realpath - Resolves pathname |
LIBRARY |
G-series native OSS processes: /G/system/sysnn/zosshsrl |
H-series OSS processes: /G/system/zdllnnn/zosshdll |
SYNOPSIS
|
#include <stdlib.h> |
char *realpath( |
const char *le_name, |
char *resolved_name); |
PARAMETERS
|
file_name ||
Is a pointer to a pathname that is to be converted to an absolute pathname. |
resolved_name ||
Is a pointer to a buffer where the resolved pathname can be stored. |
DESCRIPTION |
The realpath() function takes the pathname pointed to by the ile_name parameter and derives an |
absolute pathname for that same le. This absolute pathname does not include ".", "..", or sym- |
bolic links among its components. It is stored in the buffer pointed to by the resolved_name |
pointer and can have a maximum length of PATH_MAX bytes. |
NOTES |
The realpath() function can be called by native processes only. |
RETURN VALUES
|
On successful completion, the realpath() function returns a pointer to the absolute pathname |
derived. Otherwise, it returns a null pointer and sets errno to indicate the error, leaving the con- |
tents of the buffer pointed to by the resolved_name pointer undened. |
ERRORS |
If any of the following conditions occur, the realpath() function sets errno to the corresponding |
value: |
[EACCES] ||
Read or search permission was denied for a component of the pathname pointed |
to by le_name.|
[EIN- |
VAL]
Either the le_name parameter or the resolved_name parameter was a null |
pointer. |
[EIO] ||
An error occurred while reading from the le system. |
[ELOOP] ||
When resolving lename, too many symbolic links were encountered. |
[ENAMETOO- |
LONG] ||
The pathname pointed to by either the le_name parameter or the resolved_name |
parameters was longer than PATH_MAX bytes or a pathname component was |
longer than NAME_MAX bytes. Also, pathname resolution of a symbolic link |
527187-007 Hewlett-Packard Company 579