Hi, Currently I am doing a small project on OpenAFS. Now, I am planning to read the Vnode associated with a file. My idea is let user enter the command 'fs getvnode FILE_NAME' to view the vnode (status) information: (1) user enters 'fs getvnode /afs' (2) first get the fid for that file and then use the fid to get the vnode
while for (1) response is in the file /venus/fs.c, the function to get vnode is implemented in file /vol/vnode.c. I want to call the VGetVnode() in fs.c. But I always failed to make the modified codes. Error is: /openafs-1.4.14/lib/vlib.a(volume.o): In function 'VReleaseVolumeHandles_r': /openafs-1.4.14/src/vol/volume.c: 1235: undefined reference to 'DFlushVolume' /openafs-1.4.14/lib/vlib.a(volume.o): In function 'VCloseVolumeHandles_r': /openafs-1.4.14/src/vol/volume.c: 1323: undefined reference to 'DFlushVolume' My modifications are: (1) include more headers: #include <afs/ihandle.h> #include <afs/nfs.h> #include <afs/vnode.h> #include <afs/volume.h> #include <afs/dir.h> (2) within the method GetFidCmd() I added two lines with the if(0 == pioctl(ti->data, VIOCGETFID, &blob, 1)) int errorCode; Volume * vol = VGetVolume(&errorCode, (afs_int32)vfid.Fid.Volume); I didn't change the Makefile since seems no need to change that. I am a newbie to OpenAFS and C, plz help me to solve this silly question. Or, better idea to achieve this? Regards,
