glibc源码分析之statfs系列函数
2017-08-18 18:54
597 查看
glibc中与statfs函数相关的函数有4个,它们分别是:statfs,fstatfs,statfs64,fstatfs64。它们都是系统调用的封装函数。
关于statfs的系统调用有statfs(99),fstatfs(100),statfs64(268),fstatfs64(269)。statfs,fstatfs用于获取文件系统属性,属性是32位的。statfs64,fstatfs64用于获取文件系统属性,属性是64位的。
statfs和fstatfs函数都是脚本生成的。
statfs64和fstatfs64是.c文件构成的。
__statfs64 函数调用了statfs64系统调用。
__fstatfs64 函数调用了fstatfs64系统调用。
关于statfs的系统调用有statfs(99),fstatfs(100),statfs64(268),fstatfs64(269)。statfs,fstatfs用于获取文件系统属性,属性是32位的。statfs64,fstatfs64用于获取文件系统属性,属性是64位的。
statfs和fstatfs函数都是脚本生成的。
#define SYSCALL_NAME statfs #define SYSCALL_NARGS 2 #define SYSCALL_SYMBOL __statfs #define SYSCALL_CANCELLABLE 0 #define SYSCALL_NOERRNO 0 #define SYSCALL_ERRVAL 0 #include <syscall-template.S> weak_alias (__statfs, statfs) hidden_weak (statfs)
#define SYSCALL_NAME fstatfs #define SYSCALL_NARGS 2 #define SYSCALL_SYMBOL __fstatfs #define SYSCALL_CANCELLABLE 0 #define SYSCALL_NOERRNO 0 #define SYSCALL_ERRVAL 0 #include <syscall-template.S> weak_alias (__fstatfs, fstatfs) hidden_weak (fstatfs)
statfs64和fstatfs64是.c文件构成的。
int __statfs64 (const char *file, struct statfs64 *buf) { { int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf), buf); return result; } } weak_alias (__statfs64, statfs64)
__statfs64 函数调用了statfs64系统调用。
int __fstatfs64 (int fd, struct statfs64 *buf) { { int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf), buf); return result; } } weak_alias (__fstatfs64, fstatfs64)
__fstatfs64 函数调用了fstatfs64系统调用。
相关文章推荐
- glibc源码分析之truncate系列函数
- glibc源码分析之chown系列函数
- glibc源码分析之utime系列函数
- glibc源码分析之stat系列函数
- glibc源码分析之chmod系列函数
- glibc源码分析之stat64系列函数
- Linux-0.11内核源码分析系列:内存管理copy_page_tables()函数分析
- Linux-0.11内核源码分析系列:进程调度sleep_on()函数分析
- Linux-0.11内核源码分析系列:内存管理try_to_share()与share_page()函数分析
- Linux-0.11内核源码分析系列:内存管理get_empty_page()与put_page()函数分析
- Linux-0.11内核源码分析系列:内存管理try_to_share()与share_page()函数分析
- Linux-0.11内核源码分析系列:内存管理copy_page_tables()函数分析
- Linux-0.11内核源码分析系列:内存管理free_page()与free_page_tables()函数分析
- Linux-0.11内核源码分析系列:内存管理free_page()与free_page_tables()函数分析
- Linux-0.11内核源码分析系列:内存管理up_wp_page()与do_wp_page()函数分析
- Linux下库函数动态链接过程分析-结合glibc-2.11源码
- jQuery-1.9.1源码分析系列(十六)ajax——ajax处理流程以及核心函数
- glibc2.7源码分析之strlen()函数
- Linux-0.11内核源码分析系列:内存管理up_wp_page()与do_wp_page()函数分析
- glibc函数exit源码分析