Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
03b642a7
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
03b642a7
编写于
3月 28, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
atags_proc: switch to proc_create_data()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
3273097e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
18 deletion
+10
-18
arch/arm/kernel/atags_proc.c
arch/arm/kernel/atags_proc.c
+10
-18
未找到文件。
arch/arm/kernel/atags_proc.c
浏览文件 @
03b642a7
...
@@ -9,24 +9,18 @@ struct buffer {
...
@@ -9,24 +9,18 @@ struct buffer {
char
data
[];
char
data
[];
};
};
static
int
static
ssize_t
atags_read
(
struct
file
*
file
,
char
__user
*
buf
,
read_buffer
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
size_t
count
,
loff_t
*
ppos
)
int
*
eof
,
void
*
data
)
{
{
struct
buffer
*
buffer
=
(
struct
buffer
*
)
data
;
struct
buffer
*
b
=
PDE
(
file_inode
(
file
))
->
data
;
return
simple_read_from_buffer
(
buf
,
count
,
ppos
,
b
->
data
,
b
->
size
);
if
(
off
>=
buffer
->
size
)
{
*
eof
=
1
;
return
0
;
}
count
=
min
((
int
)
(
buffer
->
size
-
off
),
count
);
memcpy
(
page
,
&
buffer
->
data
[
off
],
count
);
return
count
;
}
}
static
const
struct
file_operations
atags_fops
=
{
.
read
=
atags_read
,
.
llseek
=
default_llseek
,
};
#define BOOT_PARAMS_SIZE 1536
#define BOOT_PARAMS_SIZE 1536
static
char
__initdata
atags_copy
[
BOOT_PARAMS_SIZE
];
static
char
__initdata
atags_copy
[
BOOT_PARAMS_SIZE
];
...
@@ -66,9 +60,7 @@ static int __init init_atags_procfs(void)
...
@@ -66,9 +60,7 @@ static int __init init_atags_procfs(void)
b
->
size
=
size
;
b
->
size
=
size
;
memcpy
(
b
->
data
,
atags_copy
,
size
);
memcpy
(
b
->
data
,
atags_copy
,
size
);
tags_entry
=
create_proc_read_entry
(
"atags"
,
0400
,
tags_entry
=
proc_create_data
(
"atags"
,
0400
,
NULL
,
&
atags_fops
,
b
);
NULL
,
read_buffer
,
b
);
if
(
!
tags_entry
)
if
(
!
tags_entry
)
goto
nomem
;
goto
nomem
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录