Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
f4ae40a6
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f4ae40a6
编写于
7月 24, 2011
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch debugfs to umode_t
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
48176a97
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
82 addition
and
82 deletion
+82
-82
Documentation/filesystems/debugfs.txt
Documentation/filesystems/debugfs.txt
+12
-12
arch/arm/mach-msm/smd_debug.c
arch/arm/mach-msm/smd_debug.c
+1
-1
arch/s390/include/asm/debug.h
arch/s390/include/asm/debug.h
+2
-2
arch/s390/kernel/debug.c
arch/s390/kernel/debug.c
+4
-4
arch/x86/xen/debugfs.c
arch/x86/xen/debugfs.c
+1
-1
arch/x86/xen/debugfs.h
arch/x86/xen/debugfs.h
+1
-1
drivers/acpi/ec_sys.c
drivers/acpi/ec_sys.c
+1
-1
drivers/mmc/card/mmc_test.c
drivers/mmc/card/mmc_test.c
+1
-1
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+1
-1
drivers/net/wireless/ath/carl9170/debug.c
drivers/net/wireless/ath/carl9170/debug.c
+1
-1
drivers/net/wireless/libertas/debugfs.c
drivers/net/wireless/libertas/debugfs.c
+1
-1
drivers/s390/block/dasd.c
drivers/s390/block/dasd.c
+2
-2
drivers/scsi/bfa/bfad_debugfs.c
drivers/scsi/bfa/bfad_debugfs.c
+1
-1
fs/debugfs/file.c
fs/debugfs/file.c
+11
-11
fs/debugfs/inode.c
fs/debugfs/inode.c
+7
-7
fs/ocfs2/cluster/netdebug.c
fs/ocfs2/cluster/netdebug.c
+1
-1
include/linux/debugfs.h
include/linux/debugfs.h
+23
-23
include/linux/relay.h
include/linux/relay.h
+1
-1
kernel/relay.c
kernel/relay.c
+1
-1
kernel/trace/blktrace.c
kernel/trace/blktrace.c
+1
-1
kernel/trace/trace.c
kernel/trace/trace.c
+1
-1
kernel/trace/trace.h
kernel/trace/trace.h
+1
-1
lib/fault-inject.c
lib/fault-inject.c
+4
-4
mm/failslab.c
mm/failslab.c
+1
-1
mm/page_alloc.c
mm/page_alloc.c
+1
-1
未找到文件。
Documentation/filesystems/debugfs.txt
浏览文件 @
f4ae40a6
...
...
@@ -35,7 +35,7 @@ described below will work.
The most general way to create a file within a debugfs directory is with:
struct dentry *debugfs_create_file(const char *name, mode_t mode,
struct dentry *debugfs_create_file(const char *name,
u
mode_t mode,
struct dentry *parent, void *data,
const struct file_operations *fops);
...
...
@@ -53,13 +53,13 @@ actually necessary; the debugfs code provides a number of helper functions
for simple situations. Files containing a single integer value can be
created with any of:
struct dentry *debugfs_create_u8(const char *name, mode_t mode,
struct dentry *debugfs_create_u8(const char *name,
u
mode_t mode,
struct dentry *parent, u8 *value);
struct dentry *debugfs_create_u16(const char *name, mode_t mode,
struct dentry *debugfs_create_u16(const char *name,
u
mode_t mode,
struct dentry *parent, u16 *value);
struct dentry *debugfs_create_u32(const char *name, mode_t mode,
struct dentry *debugfs_create_u32(const char *name,
u
mode_t mode,
struct dentry *parent, u32 *value);
struct dentry *debugfs_create_u64(const char *name, mode_t mode,
struct dentry *debugfs_create_u64(const char *name,
u
mode_t mode,
struct dentry *parent, u64 *value);
These files support both reading and writing the given value; if a specific
...
...
@@ -67,13 +67,13 @@ file should not be written to, simply set the mode bits accordingly. The
values in these files are in decimal; if hexadecimal is more appropriate,
the following functions can be used instead:
struct dentry *debugfs_create_x8(const char *name, mode_t mode,
struct dentry *debugfs_create_x8(const char *name,
u
mode_t mode,
struct dentry *parent, u8 *value);
struct dentry *debugfs_create_x16(const char *name, mode_t mode,
struct dentry *debugfs_create_x16(const char *name,
u
mode_t mode,
struct dentry *parent, u16 *value);
struct dentry *debugfs_create_x32(const char *name, mode_t mode,
struct dentry *debugfs_create_x32(const char *name,
u
mode_t mode,
struct dentry *parent, u32 *value);
struct dentry *debugfs_create_x64(const char *name, mode_t mode,
struct dentry *debugfs_create_x64(const char *name,
u
mode_t mode,
struct dentry *parent, u64 *value);
These functions are useful as long as the developer knows the size of the
...
...
@@ -81,7 +81,7 @@ value to be exported. Some types can have different widths on different
architectures, though, complicating the situation somewhat. There is a
function meant to help out in one special case:
struct dentry *debugfs_create_size_t(const char *name, mode_t mode,
struct dentry *debugfs_create_size_t(const char *name,
u
mode_t mode,
struct dentry *parent,
size_t *value);
...
...
@@ -90,7 +90,7 @@ a variable of type size_t.
Boolean values can be placed in debugfs with:
struct dentry *debugfs_create_bool(const char *name, mode_t mode,
struct dentry *debugfs_create_bool(const char *name,
u
mode_t mode,
struct dentry *parent, u32 *value);
A read on the resulting file will yield either Y (for non-zero values) or
...
...
@@ -104,7 +104,7 @@ Finally, a block of arbitrary binary data can be exported with:
unsigned long size;
};
struct dentry *debugfs_create_blob(const char *name, mode_t mode,
struct dentry *debugfs_create_blob(const char *name,
u
mode_t mode,
struct dentry *parent,
struct debugfs_blob_wrapper *blob);
...
...
arch/arm/mach-msm/smd_debug.c
浏览文件 @
f4ae40a6
...
...
@@ -215,7 +215,7 @@ static const struct file_operations debug_ops = {
.
llseek
=
default_llseek
,
};
static
void
debug_create
(
const
char
*
name
,
mode_t
mode
,
static
void
debug_create
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
dent
,
int
(
*
fill
)(
char
*
buf
,
int
max
))
{
...
...
arch/s390/include/asm/debug.h
浏览文件 @
f4ae40a6
...
...
@@ -73,7 +73,7 @@ typedef struct debug_info {
struct
dentry
*
debugfs_entries
[
DEBUG_MAX_VIEWS
];
struct
debug_view
*
views
[
DEBUG_MAX_VIEWS
];
char
name
[
DEBUG_MAX_NAME_LEN
];
mode_t
mode
;
u
mode_t
mode
;
}
debug_info_t
;
typedef
int
(
debug_header_proc_t
)
(
debug_info_t
*
id
,
...
...
@@ -124,7 +124,7 @@ debug_info_t *debug_register(const char *name, int pages, int nr_areas,
int
buf_size
);
debug_info_t
*
debug_register_mode
(
const
char
*
name
,
int
pages
,
int
nr_areas
,
int
buf_size
,
mode_t
mode
,
uid_t
uid
,
int
buf_size
,
u
mode_t
mode
,
uid_t
uid
,
gid_t
gid
);
void
debug_unregister
(
debug_info_t
*
id
);
...
...
arch/s390/kernel/debug.c
浏览文件 @
f4ae40a6
...
...
@@ -74,7 +74,7 @@ static ssize_t debug_input(struct file *file, const char __user *user_buf,
static
int
debug_open
(
struct
inode
*
inode
,
struct
file
*
file
);
static
int
debug_close
(
struct
inode
*
inode
,
struct
file
*
file
);
static
debug_info_t
*
debug_info_create
(
const
char
*
name
,
int
pages_per_area
,
int
nr_areas
,
int
buf_size
,
mode_t
mode
);
int
nr_areas
,
int
buf_size
,
u
mode_t
mode
);
static
void
debug_info_get
(
debug_info_t
*
);
static
void
debug_info_put
(
debug_info_t
*
);
static
int
debug_prolog_level_fn
(
debug_info_t
*
id
,
...
...
@@ -330,7 +330,7 @@ debug_info_free(debug_info_t* db_info){
static
debug_info_t
*
debug_info_create
(
const
char
*
name
,
int
pages_per_area
,
int
nr_areas
,
int
buf_size
,
mode_t
mode
)
int
buf_size
,
u
mode_t
mode
)
{
debug_info_t
*
rc
;
...
...
@@ -688,7 +688,7 @@ debug_close(struct inode *inode, struct file *file)
*/
debug_info_t
*
debug_register_mode
(
const
char
*
name
,
int
pages_per_area
,
int
nr_areas
,
int
buf_size
,
mode_t
mode
,
int
nr_areas
,
int
buf_size
,
u
mode_t
mode
,
uid_t
uid
,
gid_t
gid
)
{
debug_info_t
*
rc
=
NULL
;
...
...
@@ -1090,7 +1090,7 @@ debug_register_view(debug_info_t * id, struct debug_view *view)
int
rc
=
0
;
int
i
;
unsigned
long
flags
;
mode_t
mode
;
u
mode_t
mode
;
struct
dentry
*
pde
;
if
(
!
id
)
...
...
arch/x86/xen/debugfs.c
浏览文件 @
f4ae40a6
...
...
@@ -109,7 +109,7 @@ static const struct file_operations u32_array_fops = {
.
llseek
=
no_llseek
,
};
struct
dentry
*
xen_debugfs_create_u32_array
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
xen_debugfs_create_u32_array
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
array
,
unsigned
elements
)
{
...
...
arch/x86/xen/debugfs.h
浏览文件 @
f4ae40a6
...
...
@@ -3,7 +3,7 @@
struct
dentry
*
__init
xen_init_debugfs
(
void
);
struct
dentry
*
xen_debugfs_create_u32_array
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
xen_debugfs_create_u32_array
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
array
,
unsigned
elements
);
...
...
drivers/acpi/ec_sys.c
浏览文件 @
f4ae40a6
...
...
@@ -105,7 +105,7 @@ int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count)
{
struct
dentry
*
dev_dir
;
char
name
[
64
];
mode_t
mode
=
0400
;
u
mode_t
mode
=
0400
;
if
(
ec_device_count
==
0
)
{
acpi_ec_debugfs_dir
=
debugfs_create_dir
(
"ec"
,
NULL
);
...
...
drivers/mmc/card/mmc_test.c
浏览文件 @
f4ae40a6
...
...
@@ -2949,7 +2949,7 @@ static void mmc_test_free_dbgfs_file(struct mmc_card *card)
}
static
int
__mmc_test_register_dbgfs_file
(
struct
mmc_card
*
card
,
const
char
*
name
,
mode_t
mode
,
const
struct
file_operations
*
fops
)
const
char
*
name
,
u
mode_t
mode
,
const
struct
file_operations
*
fops
)
{
struct
dentry
*
file
=
NULL
;
struct
mmc_test_dbgfs_file
*
df
;
...
...
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
浏览文件 @
f4ae40a6
...
...
@@ -2000,7 +2000,7 @@ static const struct file_operations interfaces_proc_fops = {
*/
struct
cxgb4vf_debugfs_entry
{
const
char
*
name
;
/* name of debugfs node */
mode_t
mode
;
/* file system mode */
u
mode_t
mode
;
/* file system mode */
const
struct
file_operations
*
fops
;
};
...
...
drivers/net/wireless/ath/carl9170/debug.c
浏览文件 @
f4ae40a6
...
...
@@ -56,7 +56,7 @@ static int carl9170_debugfs_open(struct inode *inode, struct file *file)
struct
carl9170_debugfs_fops
{
unsigned
int
read_bufsize
;
mode_t
attr
;
u
mode_t
attr
;
char
*
(
*
read
)(
struct
ar9170
*
ar
,
char
*
buf
,
size_t
bufsize
,
ssize_t
*
len
);
ssize_t
(
*
write
)(
struct
ar9170
*
aru
,
const
char
*
buf
,
size_t
size
);
...
...
drivers/net/wireless/libertas/debugfs.c
浏览文件 @
f4ae40a6
...
...
@@ -704,7 +704,7 @@ static ssize_t lbs_wrrf_write(struct file *file,
struct
lbs_debugfs_files
{
const
char
*
name
;
in
t
perm
;
umode_
t
perm
;
struct
file_operations
fops
;
};
...
...
drivers/s390/block/dasd.c
浏览文件 @
f4ae40a6
...
...
@@ -1073,7 +1073,7 @@ static const struct file_operations dasd_stats_global_fops = {
static
void
dasd_profile_init
(
struct
dasd_profile
*
profile
,
struct
dentry
*
base_dentry
)
{
mode_t
mode
;
u
mode_t
mode
;
struct
dentry
*
pde
;
if
(
!
base_dentry
)
...
...
@@ -1112,7 +1112,7 @@ static void dasd_statistics_removeroot(void)
static
void
dasd_statistics_createroot
(
void
)
{
mode_t
mode
;
u
mode_t
mode
;
struct
dentry
*
pde
;
dasd_debugfs_root_entry
=
NULL
;
...
...
drivers/scsi/bfa/bfad_debugfs.c
浏览文件 @
f4ae40a6
...
...
@@ -472,7 +472,7 @@ static const struct file_operations bfad_debugfs_op_regwr = {
struct
bfad_debugfs_entry
{
const
char
*
name
;
mode_t
mode
;
u
mode_t
mode
;
const
struct
file_operations
*
fops
;
};
...
...
fs/debugfs/file.c
浏览文件 @
f4ae40a6
...
...
@@ -95,7 +95,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u8_wo, NULL, debugfs_u8_set, "%llu\n");
* %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
* code.
*/
struct
dentry
*
debugfs_create_u8
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_u8
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u8
*
value
)
{
/* if there are no write bits set, make read only */
...
...
@@ -147,7 +147,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u16_wo, NULL, debugfs_u16_set, "%llu\n");
* %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
* code.
*/
struct
dentry
*
debugfs_create_u16
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_u16
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u16
*
value
)
{
/* if there are no write bits set, make read only */
...
...
@@ -199,7 +199,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u32_wo, NULL, debugfs_u32_set, "%llu\n");
* %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
* code.
*/
struct
dentry
*
debugfs_create_u32
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_u32
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
)
{
/* if there are no write bits set, make read only */
...
...
@@ -252,7 +252,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_u64_wo, NULL, debugfs_u64_set, "%llu\n");
* %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
* code.
*/
struct
dentry
*
debugfs_create_u64
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_u64
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u64
*
value
)
{
/* if there are no write bits set, make read only */
...
...
@@ -298,7 +298,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_x64, debugfs_u64_get, debugfs_u64_set, "0x%016llx\n
* @value: a pointer to the variable that the file should read to and write
* from.
*/
struct
dentry
*
debugfs_create_x8
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_x8
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u8
*
value
)
{
/* if there are no write bits set, make read only */
...
...
@@ -322,7 +322,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x8);
* @value: a pointer to the variable that the file should read to and write
* from.
*/
struct
dentry
*
debugfs_create_x16
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_x16
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u16
*
value
)
{
/* if there are no write bits set, make read only */
...
...
@@ -346,7 +346,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x16);
* @value: a pointer to the variable that the file should read to and write
* from.
*/
struct
dentry
*
debugfs_create_x32
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_x32
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
)
{
/* if there are no write bits set, make read only */
...
...
@@ -370,7 +370,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_x32);
* @value: a pointer to the variable that the file should read to and write
* from.
*/
struct
dentry
*
debugfs_create_x64
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_x64
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u64
*
value
)
{
return
debugfs_create_file
(
name
,
mode
,
parent
,
value
,
&
fops_x64
);
...
...
@@ -401,7 +401,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_size_t, debugfs_size_t_get, debugfs_size_t_set,
* @value: a pointer to the variable that the file should read to and write
* from.
*/
struct
dentry
*
debugfs_create_size_t
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_size_t
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
size_t
*
value
)
{
return
debugfs_create_file
(
name
,
mode
,
parent
,
value
,
&
fops_size_t
);
...
...
@@ -473,7 +473,7 @@ static const struct file_operations fops_bool = {
* %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
* code.
*/
struct
dentry
*
debugfs_create_bool
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_bool
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
)
{
return
debugfs_create_file
(
name
,
mode
,
parent
,
value
,
&
fops_bool
);
...
...
@@ -518,7 +518,7 @@ static const struct file_operations fops_blob = {
* %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
* code.
*/
struct
dentry
*
debugfs_create_blob
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_blob
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
struct
debugfs_blob_wrapper
*
blob
)
{
...
...
fs/debugfs/inode.c
浏览文件 @
f4ae40a6
...
...
@@ -30,7 +30,7 @@ static struct vfsmount *debugfs_mount;
static
int
debugfs_mount_count
;
static
bool
debugfs_registered
;
static
struct
inode
*
debugfs_get_inode
(
struct
super_block
*
sb
,
in
t
mode
,
dev_t
dev
,
static
struct
inode
*
debugfs_get_inode
(
struct
super_block
*
sb
,
umode_
t
mode
,
dev_t
dev
,
void
*
data
,
const
struct
file_operations
*
fops
)
{
...
...
@@ -69,7 +69,7 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d
/* SMP-safe */
static
int
debugfs_mknod
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
in
t
mode
,
dev_t
dev
,
void
*
data
,
umode_
t
mode
,
dev_t
dev
,
void
*
data
,
const
struct
file_operations
*
fops
)
{
struct
inode
*
inode
;
...
...
@@ -87,7 +87,7 @@ static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
return
error
;
}
static
int
debugfs_mkdir
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
in
t
mode
,
static
int
debugfs_mkdir
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_
t
mode
,
void
*
data
,
const
struct
file_operations
*
fops
)
{
int
res
;
...
...
@@ -101,14 +101,14 @@ static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, int mode,
return
res
;
}
static
int
debugfs_link
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
in
t
mode
,
static
int
debugfs_link
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_
t
mode
,
void
*
data
,
const
struct
file_operations
*
fops
)
{
mode
=
(
mode
&
S_IALLUGO
)
|
S_IFLNK
;
return
debugfs_mknod
(
dir
,
dentry
,
mode
,
0
,
data
,
fops
);
}
static
int
debugfs_create
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
in
t
mode
,
static
int
debugfs_create
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_
t
mode
,
void
*
data
,
const
struct
file_operations
*
fops
)
{
int
res
;
...
...
@@ -146,7 +146,7 @@ static struct file_system_type debug_fs_type = {
.
kill_sb
=
kill_litter_super
,
};
static
int
debugfs_create_by_name
(
const
char
*
name
,
mode_t
mode
,
static
int
debugfs_create_by_name
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
struct
dentry
**
dentry
,
void
*
data
,
...
...
@@ -214,7 +214,7 @@ static int debugfs_create_by_name(const char *name, mode_t mode,
* If debugfs is not enabled in the kernel, the value -%ENODEV will be
* returned.
*/
struct
dentry
*
debugfs_create_file
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_file
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
void
*
data
,
const
struct
file_operations
*
fops
)
{
...
...
fs/ocfs2/cluster/netdebug.c
浏览文件 @
f4ae40a6
...
...
@@ -553,7 +553,7 @@ void o2net_debugfs_exit(void)
int
o2net_debugfs_init
(
void
)
{
mode_t
mode
=
S_IFREG
|
S_IRUSR
;
u
mode_t
mode
=
S_IFREG
|
S_IRUSR
;
o2net_dentry
=
debugfs_create_dir
(
O2NET_DEBUG_DIR
,
NULL
);
if
(
o2net_dentry
)
...
...
include/linux/debugfs.h
浏览文件 @
f4ae40a6
...
...
@@ -34,7 +34,7 @@ extern struct dentry *arch_debugfs_dir;
extern
const
struct
file_operations
debugfs_file_operations
;
extern
const
struct
inode_operations
debugfs_link_operations
;
struct
dentry
*
debugfs_create_file
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_file
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
void
*
data
,
const
struct
file_operations
*
fops
);
...
...
@@ -49,28 +49,28 @@ void debugfs_remove_recursive(struct dentry *dentry);
struct
dentry
*
debugfs_rename
(
struct
dentry
*
old_dir
,
struct
dentry
*
old_dentry
,
struct
dentry
*
new_dir
,
const
char
*
new_name
);
struct
dentry
*
debugfs_create_u8
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_u8
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u8
*
value
);
struct
dentry
*
debugfs_create_u16
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_u16
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u16
*
value
);
struct
dentry
*
debugfs_create_u32
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_u32
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
);
struct
dentry
*
debugfs_create_u64
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_u64
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u64
*
value
);
struct
dentry
*
debugfs_create_x8
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_x8
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u8
*
value
);
struct
dentry
*
debugfs_create_x16
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_x16
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u16
*
value
);
struct
dentry
*
debugfs_create_x32
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_x32
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
);
struct
dentry
*
debugfs_create_x64
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_x64
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u64
*
value
);
struct
dentry
*
debugfs_create_size_t
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_size_t
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
size_t
*
value
);
struct
dentry
*
debugfs_create_bool
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_bool
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
);
struct
dentry
*
debugfs_create_blob
(
const
char
*
name
,
mode_t
mode
,
struct
dentry
*
debugfs_create_blob
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
struct
debugfs_blob_wrapper
*
blob
);
...
...
@@ -86,7 +86,7 @@ bool debugfs_initialized(void);
* want to duplicate the design decision mistakes of procfs and devfs again.
*/
static
inline
struct
dentry
*
debugfs_create_file
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_file
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
void
*
data
,
const
struct
file_operations
*
fops
)
{
...
...
@@ -118,70 +118,70 @@ static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentr
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_u8
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_u8
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u8
*
value
)
{
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_u16
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_u16
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u16
*
value
)
{
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_u32
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_u32
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
)
{
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_u64
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_u64
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u64
*
value
)
{
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_x8
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_x8
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u8
*
value
)
{
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_x16
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_x16
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u16
*
value
)
{
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_x32
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_x32
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
)
{
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_size_t
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_size_t
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
size_t
*
value
)
{
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_bool
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_bool
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
)
{
return
ERR_PTR
(
-
ENODEV
);
}
static
inline
struct
dentry
*
debugfs_create_blob
(
const
char
*
name
,
mode_t
mode
,
static
inline
struct
dentry
*
debugfs_create_blob
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
struct
debugfs_blob_wrapper
*
blob
)
{
...
...
include/linux/relay.h
浏览文件 @
f4ae40a6
...
...
@@ -144,7 +144,7 @@ struct rchan_callbacks
*/
struct
dentry
*
(
*
create_buf_file
)(
const
char
*
filename
,
struct
dentry
*
parent
,
in
t
mode
,
umode_
t
mode
,
struct
rchan_buf
*
buf
,
int
*
is_global
);
...
...
kernel/relay.c
浏览文件 @
f4ae40a6
...
...
@@ -302,7 +302,7 @@ static void buf_unmapped_default_callback(struct rchan_buf *buf,
*/
static
struct
dentry
*
create_buf_file_default_callback
(
const
char
*
filename
,
struct
dentry
*
parent
,
in
t
mode
,
umode_
t
mode
,
struct
rchan_buf
*
buf
,
int
*
is_global
)
{
...
...
kernel/trace/blktrace.c
浏览文件 @
f4ae40a6
...
...
@@ -402,7 +402,7 @@ static int blk_remove_buf_file_callback(struct dentry *dentry)
static
struct
dentry
*
blk_create_buf_file_callback
(
const
char
*
filename
,
struct
dentry
*
parent
,
in
t
mode
,
umode_
t
mode
,
struct
rchan_buf
*
buf
,
int
*
is_global
)
{
...
...
kernel/trace/trace.c
浏览文件 @
f4ae40a6
...
...
@@ -4385,7 +4385,7 @@ static const struct file_operations trace_options_core_fops = {
};
struct
dentry
*
trace_create_file
(
const
char
*
name
,
mode_t
mode
,
u
mode_t
mode
,
struct
dentry
*
parent
,
void
*
data
,
const
struct
file_operations
*
fops
)
...
...
kernel/trace/trace.h
浏览文件 @
f4ae40a6
...
...
@@ -312,7 +312,7 @@ void tracing_reset_current(int cpu);
void
tracing_reset_current_online_cpus
(
void
);
int
tracing_open_generic
(
struct
inode
*
inode
,
struct
file
*
filp
);
struct
dentry
*
trace_create_file
(
const
char
*
name
,
mode_t
mode
,
u
mode_t
mode
,
struct
dentry
*
parent
,
void
*
data
,
const
struct
file_operations
*
fops
);
...
...
lib/fault-inject.c
浏览文件 @
f4ae40a6
...
...
@@ -149,7 +149,7 @@ static int debugfs_ul_get(void *data, u64 *val)
DEFINE_SIMPLE_ATTRIBUTE
(
fops_ul
,
debugfs_ul_get
,
debugfs_ul_set
,
"%llu
\n
"
);
static
struct
dentry
*
debugfs_create_ul
(
const
char
*
name
,
mode_t
mode
,
static
struct
dentry
*
debugfs_create_ul
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
unsigned
long
*
value
)
{
return
debugfs_create_file
(
name
,
mode
,
parent
,
value
,
&
fops_ul
);
...
...
@@ -169,7 +169,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_stacktrace_depth, debugfs_ul_get,
debugfs_stacktrace_depth_set
,
"%llu
\n
"
);
static
struct
dentry
*
debugfs_create_stacktrace_depth
(
const
char
*
name
,
mode_t
mode
,
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
unsigned
long
*
value
)
{
return
debugfs_create_file
(
name
,
mode
,
parent
,
value
,
...
...
@@ -193,7 +193,7 @@ static int debugfs_atomic_t_get(void *data, u64 *val)
DEFINE_SIMPLE_ATTRIBUTE
(
fops_atomic_t
,
debugfs_atomic_t_get
,
debugfs_atomic_t_set
,
"%lld
\n
"
);
static
struct
dentry
*
debugfs_create_atomic_t
(
const
char
*
name
,
mode_t
mode
,
static
struct
dentry
*
debugfs_create_atomic_t
(
const
char
*
name
,
u
mode_t
mode
,
struct
dentry
*
parent
,
atomic_t
*
value
)
{
return
debugfs_create_file
(
name
,
mode
,
parent
,
value
,
&
fops_atomic_t
);
...
...
@@ -202,7 +202,7 @@ static struct dentry *debugfs_create_atomic_t(const char *name, mode_t mode,
struct
dentry
*
fault_create_debugfs_attr
(
const
char
*
name
,
struct
dentry
*
parent
,
struct
fault_attr
*
attr
)
{
mode_t
mode
=
S_IFREG
|
S_IRUSR
|
S_IWUSR
;
u
mode_t
mode
=
S_IFREG
|
S_IRUSR
|
S_IWUSR
;
struct
dentry
*
dir
;
dir
=
debugfs_create_dir
(
name
,
parent
);
...
...
mm/failslab.c
浏览文件 @
f4ae40a6
...
...
@@ -35,7 +35,7 @@ __setup("failslab=", setup_failslab);
static
int
__init
failslab_debugfs_init
(
void
)
{
struct
dentry
*
dir
;
mode_t
mode
=
S_IFREG
|
S_IRUSR
|
S_IWUSR
;
u
mode_t
mode
=
S_IFREG
|
S_IRUSR
|
S_IWUSR
;
dir
=
fault_create_debugfs_attr
(
"failslab"
,
NULL
,
&
failslab
.
attr
);
if
(
IS_ERR
(
dir
))
...
...
mm/page_alloc.c
浏览文件 @
f4ae40a6
...
...
@@ -1408,7 +1408,7 @@ static int should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
static
int
__init
fail_page_alloc_debugfs
(
void
)
{
mode_t
mode
=
S_IFREG
|
S_IRUSR
|
S_IWUSR
;
u
mode_t
mode
=
S_IFREG
|
S_IRUSR
|
S_IWUSR
;
struct
dentry
*
dir
;
dir
=
fault_create_debugfs_attr
(
"fail_page_alloc"
,
NULL
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录