Hi,
Currently dm_fd_to_hdl is not supported. Here is a
patch which makes use of fget in linux
girish
-----------------------------------------------------
diff -urN linux/fs/xfs/dmapi/dmapi_register.c
linux_c/fs/xfs/dmapi/dmapi_register.c
--- linux/fs/xfs/dmapi/dmapi_register.c Wed Oct 11
21:15:35 2000
+++ linux_c/fs/xfs/dmapi/dmapi_register.c Fri
Apr 6 09:58:10 2001
@@ -864,13 +864,22 @@
if ((error = getf(fd, &vfilep)) != 0)
return(error);
#else
- return(ENOSYS);
+ struct file * filep=fget(fd);
#endif
+#ifdef __sgi
if (!VF_IS_VNODE(vfilep))
return(EINVAL);
-
+#else
+ if (!filep)
+ return(EBADF);
+#endif
+#ifdef __sgi
if ((error =
dm_vp_to_handle(VF_TO_VNODE(vfilep), &handle)) != 0)
return(error);
+#else
+ if ((error =
dm_vp_to_handle(LINVFS_GET_VP(filep->f_dentry->d_inode),
&handle)) != 0)
+ return(error);
+#endif
if ((fsrp =
dm_find_fsreg_and_lock((fsid_t*)&handle.ha_fsid, &lc))
== NULL)
return(EBADF);
@@ -887,6 +896,7 @@
#ifdef __sgi
return(dm_cpoutsizet(hlenp, hlen));
#else
+ fput(filep);
return(put_user(hlen, hlenp));
#endif
}
---------------------------------------------------
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
|