glibc源码分析之statfs系列函数
来源:互联网 发布:郝斌老师c语言笔记 编辑:程序博客网 时间:2024/05/18 12:05
glibc中与statfs函数相关的函数有4个,它们分别是:statfs,fstatfs,statfs64,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系统调用。
阅读全文
1 0
- glibc源码分析之statfs系列函数
- glibc源码分析之stat系列函数
- glibc源码分析之stat64系列函数
- glibc源码分析之chmod系列函数
- glibc源码分析之truncate系列函数
- glibc源码分析之chown系列函数
- glibc源码分析之utime系列函数
- glibc源码分析之access函数
- glibc源码分析之rename函数
- glibc函数exit源码分析
- glibc源码分析之普通文件读写
- glibc源码分析之getpriority,setpriority,nice
- glibc源码分析之用户管理
- glibc 系列之strlen()函数
- [glibc源码分析] bzero
- strlen glibc 源码分析
- glibc--memcpy源码分析
- glibc--strcpy源码分析
- Redis面试常见问题
- Linux下diff与patch命令的配合使用
- MapReduce找共同好友
- 基于UDP协议的Socket网络编程
- python 操作 mongodb (pymongo的使用)
- glibc源码分析之statfs系列函数
- Linux下skel框架目录的简介与使用
- 文章标题
- 多校连萌(4)-GJJ的日常之再游戏
- static详解
- 什么是学习
- CSRF的攻击和防御
- Spring 报错 : org.springframework.beans.factory.BeanDefinitionStoreException
- 微信运动刷步数软件,真正一键搞定2017