您的位置:首页 > 其它

glibc源码分析之chmod系列函数

2017-08-15 19:39 1356 查看
glibc中关于chmod系列的函数有chmod,fchmod。它们都是用于改变文件的属性。

在glibc中chmod和fchmod两个函数都是使用脚本生成的系统调用的封装函数。

它们生成的.S文件内容分别为:

#define SYSCALL_NAME chmod
#define SYSCALL_NARGS 2
#define SYSCALL_SYMBOL __chmod
#define SYSCALL_CANCELLABLE 0
#define SYSCALL_NOERRNO 0
#define SYSCALL_ERRVAL 0
#include <syscall-template.S>
weak_alias (__chmod, chmod)
hidden_weak (chmod)


#define SYSCALL_NAME fchmod
#define SYSCALL_NARGS 2
#define SYSCALL_SYMBOL __fchmod
#define SYSCALL_CANCELLABLE 0
#define SYSCALL_NOERRNO 0
#define SYSCALL_ERRVAL 0
#include <syscall-template.S>
weak_alias (__fchmod, fchmod)
hidden_weak (fchmod)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: