Library routines are available to get the pathname of the current working directory and display a pathname with adornments.
This routine gets the fully adorned path name for the current working directory. Refer to the mldgetcwd(3TSOL) man page.
char* mldgetcwd(char *buf, size_t size);
This routine gets the adorned name for the MLD specified in path_name. Refer to the adornfc(3TSOL) man page.
int adornfc(const char *path_name, char *adorned_name);
These routines take the path name supplied in path_name, expand all symbolic links, resolve dot references to the current directory and dot-dot references to the parent directory, remove extra slash characters, add the correct MLD and SLD adornments, and store the final result in resolved_path. The result is for the SLD at which the process is running, or at the specified SLD. Refer to the mldrealpath(3TSOL) man page.
char* mldrealpath(const char *path_name, char *resolved_path); char *mldrealpathl(const char *path_name, char *resolved_path, const bslabel_t *senslabel);