Function report |
Source Code:fs\fhandle.c |
Create Date:2022-07-28 20:31:16 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:do_sys_name_to_handle
Proto:static long do_sys_name_to_handle(struct path *path, struct file_handle __user *ufh, int __user *mnt_id)
Type:long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct path * | path | |
| struct file_handle __user * | ufh | |
| int __user * | mnt_id |
| 24 | struct file_handle * handle = NULL |
| 30 | If Not s_export_op || Not fh_to_dentry Then Return -EOPNOTSUPP |
| 34 | If copy_from_user( & f_handle, ufh, sizeof(structfile_handle)) Then Return -EFAULT |
| 37 | If handle_bytes > limit the handle size to NFSv4 handle size now Then Return -EINVAL |
| 40 | handle = Allocation memory |
| 46 | handle_dwords = handle_bytes >> 2 |
| 49 | retval = exportfs_encode_fh(dentry, (structfid * ) file identifier , & handle_dwords, 0) |
| 52 | handle_type = retval |
| 54 | handle_bytes = handle_dwords * sizeof(u32) |
| 55 | handle_bytes = handle_bytes |
| 56 | If handle_bytes > handle_bytes || retval == FILEID_INVALID || retval == -ENOSPC Then |
| 67 | handle_bytes = 0 |
| 69 | Else retval = 0 |
| 72 | If Write a simple value into user space( mount identifier , mnt_id) || copy_to_user(ufh, handle, sizeof(structfile_handle) + handle_bytes) Then retval = -EFAULT |
| 77 | Return retval |
| Name | Describe |
|---|---|
| SYSCALL_DEFINE5 | sys_name_to_handle_at: convert name to handle*@dfd: directory relative to which name is interpreted if not absolute*@name: name that should be converted to handle |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |