Function report |
Source Code:fs\readdir.c |
Create Date:2022-07-28 20:06:37 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:filldir64
Proto:static int filldir64(struct dir_context *ctx, const char *name, int namlen, loff_t offset, u64 ino, unsigned int d_type)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct dir_context * | ctx | |
const char * | name | |
int | namlen | |
loff_t | offset | |
u64 | ino | |
unsigned int | d_type |
315 | reclen = @a is a power of 2 value (offsetof(structlinux_dirent64, d_name) + namlen + 1, sizeof(u64)) |
320 | If Value for the false possibility is greater at compile time(error) Then Return error |
325 | prev_reclen = prev_reclen |
326 | If prev_reclen && signal_pending(current process) Then Return -EINTR |
328 | dirent = current_dir |
329 | prev = dirent - prev_reclen |
334 | unsafe_put_user(offset, & d_off, efault_end) |
335 | unsafe_put_user(ino, & d_ino, efault_end) |
336 | unsafe_put_user(reclen, & d_reclen, efault_end) |
337 | unsafe_put_user(d_type, & d_type, efault_end) |
338 | Note the "unsafe_put_user() semantics: we goto a* label for errors.(d_name, name, namlen, efault_end) |
339 | user_access_end() |
341 | prev_reclen = reclen |
342 | current_dir = dirent + reclen |
344 | Return 0 |
346 | efault_end : |
347 | user_access_end() |
348 | efault : |
350 | Return -EFAULT |
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 |