Operating System - HP-UX
1752797 Members
5773 Online
108789 Solutions
New Discussion юеВ

Re: getdents() and vxfs_nattr_open()

 
jmgallag
Occasional Contributor

getdents() and vxfs_nattr_open()

Hi,

I am reading up on VxFS named attributes and would like to experiment. The call to list the named attributes associated with a file is:

int vxfs_nattr_open(int fd, char *path, int *oflag, /* mode_t mode */);

where fd is the file descriptor of the file whose extended attributes we want to list. This call returns a second file descriptor that is processed as a directory using getdents(). An interface returning a DIR * for use with readdir() is not provided, and getdents() is documented as not supported on HP-UX.

Using nm on libc.so shows that getdents is present:

[888]    |     69359520|     128|FUNC |LOCAL|0|   .text|libc.so:_getdents
[4043]   |     69359520|     128|FUNC |WEAK |0|   .text|libc.so:getdents

But no prototype is present in the system headers. :-(

Easy enough to add a getdents prototype and call it anyway, but what are the risks?

Thanks,

Jim Gallagher

2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: getdents() and vxfs_nattr_open()

Hmm, where are you getting your documentation?  Here?

http://sfdoccentral.symantec.com/sf/5.0/hpux11iv3/html/vxfs_ref/pr_ch_datastreams_fs.html

 

I seem to only get a "directory" when I pass in ".".

jmgallag
Occasional Contributor

Re: getdents() and vxfs_nattr_open()

That matches what I read, and the example uses getdents()...