HI all,
With DSCript, I used to write the following script to retreive inode value for a given file handles.
fi_inode = (F == NULL) ? 0 :
F->fg_ops->fo_type != DTYPE_VNODE ? 0:
((struct vnode *) F->fg_data)->v_tag != 16 ? 0: / HFS */
((struct cnode*) ((struct vnode *) F->fg_data)->v_data)->c_attr.ca_fileid;
However, from OSX Sierra kernel (xnu-3789.21.4), I found out that code for HFS is separated as a different source base.
As a result, above Dscript which used to work for previous versions of OSX up to 10.11 stopped to working since struct cnode which is defined from hfs_internals.h now included from hfs source base and is no longer visible from xnu kernel.
Would you let me know how to resolve this issue?
Thanks!