Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
84eb3532
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
84eb3532
编写于
9月 16, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ncpfs: switch to %p[dD]
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
4cb2a01d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
43 deletion
+24
-43
fs/ncpfs/dir.c
fs/ncpfs/dir.c
+20
-35
fs/ncpfs/file.c
fs/ncpfs/file.c
+4
-8
未找到文件。
fs/ncpfs/dir.c
浏览文件 @
84eb3532
...
...
@@ -339,9 +339,8 @@ ncp_lookup_validate(struct dentry *dentry, unsigned int flags)
if
(
val
)
goto
finished
;
DDPRINTK
(
"ncp_lookup_validate: %s/%s not valid, age=%ld, server lookup
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
NCP_GET_AGE
(
dentry
));
DDPRINTK
(
"ncp_lookup_validate: %pd2 not valid, age=%ld, server lookup
\n
"
,
dentry
,
NCP_GET_AGE
(
dentry
));
len
=
sizeof
(
__name
);
if
(
ncp_is_server_root
(
dir
))
{
...
...
@@ -359,8 +358,8 @@ ncp_lookup_validate(struct dentry *dentry, unsigned int flags)
res
=
ncp_obtain_info
(
server
,
dir
,
__name
,
&
(
finfo
.
i
));
}
finfo
.
volume
=
finfo
.
i
.
volNumber
;
DDPRINTK
(
"ncp_lookup_validate: looked for %
s
/%s, res=%d
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
__name
,
res
);
DDPRINTK
(
"ncp_lookup_validate: looked for %
pd
/%s, res=%d
\n
"
,
dentry
->
d_parent
,
__name
,
res
);
/*
* If we didn't find it, or if it has a different dirEntNum to
* what we remember, it's not valid any more.
...
...
@@ -454,8 +453,7 @@ static int ncp_readdir(struct file *file, struct dir_context *ctx)
ctl
.
page
=
NULL
;
ctl
.
cache
=
NULL
;
DDPRINTK
(
"ncp_readdir: reading %s/%s, pos=%d
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
DDPRINTK
(
"ncp_readdir: reading %pD2, pos=%d
\n
"
,
file
,
(
int
)
ctx
->
pos
);
result
=
-
EIO
;
...
...
@@ -740,12 +738,10 @@ ncp_do_readdir(struct file *file, struct dir_context *ctx,
int
more
;
size_t
bufsize
;
DPRINTK
(
"ncp_do_readdir: %s/%s, fpos=%ld
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
DPRINTK
(
"ncp_do_readdir: %pD2, fpos=%ld
\n
"
,
file
,
(
unsigned
long
)
ctx
->
pos
);
PPRINTK
(
"ncp_do_readdir: init %s, volnum=%d, dirent=%u
\n
"
,
dentry
->
d_name
.
name
,
NCP_FINFO
(
dir
)
->
volNumber
,
NCP_FINFO
(
dir
)
->
dirEntNum
);
PPRINTK
(
"ncp_do_readdir: init %pD, volnum=%d, dirent=%u
\n
"
,
file
,
NCP_FINFO
(
dir
)
->
volNumber
,
NCP_FINFO
(
dir
)
->
dirEntNum
);
err
=
ncp_initialize_search
(
server
,
dir
,
&
seq
);
if
(
err
)
{
...
...
@@ -850,8 +846,7 @@ static struct dentry *ncp_lookup(struct inode *dir, struct dentry *dentry, unsig
if
(
!
ncp_conn_valid
(
server
))
goto
finished
;
PPRINTK
(
"ncp_lookup: server lookup for %s/%s
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
PPRINTK
(
"ncp_lookup: server lookup for %pd2
\n
"
,
dentry
);
len
=
sizeof
(
__name
);
if
(
ncp_is_server_root
(
dir
))
{
...
...
@@ -867,8 +862,7 @@ static struct dentry *ncp_lookup(struct inode *dir, struct dentry *dentry, unsig
if
(
!
res
)
res
=
ncp_obtain_info
(
server
,
dir
,
__name
,
&
(
finfo
.
i
));
}
PPRINTK
(
"ncp_lookup: looked for %s/%s, res=%d
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
__name
,
res
);
PPRINTK
(
"ncp_lookup: looked for %pd2, res=%d
\n
"
,
dentry
,
res
);
/*
* If we didn't find an entry, make a negative dentry.
*/
...
...
@@ -915,8 +909,7 @@ static int ncp_instantiate(struct inode *dir, struct dentry *dentry,
return
error
;
out_close:
PPRINTK
(
"ncp_instantiate: %s/%s failed, closing file
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
PPRINTK
(
"ncp_instantiate: %pd2 failed, closing file
\n
"
,
dentry
);
ncp_close_file
(
NCP_SERVER
(
dir
),
finfo
->
file_handle
);
goto
out
;
}
...
...
@@ -930,8 +923,7 @@ int ncp_create_new(struct inode *dir, struct dentry *dentry, umode_t mode,
int
opmode
;
__u8
__name
[
NCP_MAXPATHLEN
+
1
];
PPRINTK
(
"ncp_create_new: creating %s/%s, mode=%hx
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
mode
);
PPRINTK
(
"ncp_create_new: creating %pd2, mode=%hx
\n
"
,
dentry
,
mode
);
ncp_age_dentry
(
server
,
dentry
);
len
=
sizeof
(
__name
);
...
...
@@ -960,8 +952,7 @@ int ncp_create_new(struct inode *dir, struct dentry *dentry, umode_t mode,
error
=
-
ENAMETOOLONG
;
else
if
(
result
<
0
)
error
=
result
;
DPRINTK
(
"ncp_create: %s/%s failed
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
DPRINTK
(
"ncp_create: %pd2 failed
\n
"
,
dentry
);
goto
out
;
}
opmode
=
O_WRONLY
;
...
...
@@ -994,8 +985,7 @@ static int ncp_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
int
error
,
len
;
__u8
__name
[
NCP_MAXPATHLEN
+
1
];
DPRINTK
(
"ncp_mkdir: making %s/%s
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
DPRINTK
(
"ncp_mkdir: making %pd2
\n
"
,
dentry
);
ncp_age_dentry
(
server
,
dentry
);
len
=
sizeof
(
__name
);
...
...
@@ -1032,8 +1022,7 @@ static int ncp_rmdir(struct inode *dir, struct dentry *dentry)
int
error
,
result
,
len
;
__u8
__name
[
NCP_MAXPATHLEN
+
1
];
DPRINTK
(
"ncp_rmdir: removing %s/%s
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
DPRINTK
(
"ncp_rmdir: removing %pd2
\n
"
,
dentry
);
len
=
sizeof
(
__name
);
error
=
ncp_io2vol
(
server
,
__name
,
&
len
,
dentry
->
d_name
.
name
,
...
...
@@ -1078,8 +1067,7 @@ static int ncp_unlink(struct inode *dir, struct dentry *dentry)
int
error
;
server
=
NCP_SERVER
(
dir
);
DPRINTK
(
"ncp_unlink: unlinking %s/%s
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
DPRINTK
(
"ncp_unlink: unlinking %pd2
\n
"
,
dentry
);
/*
* Check whether to close the file ...
...
...
@@ -1099,8 +1087,7 @@ static int ncp_unlink(struct inode *dir, struct dentry *dentry)
#endif
switch
(
error
)
{
case
0x00
:
DPRINTK
(
"ncp: removed %s/%s
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
DPRINTK
(
"ncp: removed %pd2
\n
"
,
dentry
);
break
;
case
0x85
:
case
0x8A
:
...
...
@@ -1133,9 +1120,7 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry,
int
old_len
,
new_len
;
__u8
__old_name
[
NCP_MAXPATHLEN
+
1
],
__new_name
[
NCP_MAXPATHLEN
+
1
];
DPRINTK
(
"ncp_rename: %s/%s to %s/%s
\n
"
,
old_dentry
->
d_parent
->
d_name
.
name
,
old_dentry
->
d_name
.
name
,
new_dentry
->
d_parent
->
d_name
.
name
,
new_dentry
->
d_name
.
name
);
DPRINTK
(
"ncp_rename: %pd2 to %pd2
\n
"
,
old_dentry
,
new_dentry
);
ncp_age_dentry
(
server
,
old_dentry
);
ncp_age_dentry
(
server
,
new_dentry
);
...
...
@@ -1165,8 +1150,8 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry,
#endif
switch
(
error
)
{
case
0x00
:
DPRINTK
(
"ncp renamed %
s -> %s
.
\n
"
,
old_dentry
->
d_name
.
name
,
new_dentry
->
d_name
.
name
);
DPRINTK
(
"ncp renamed %
pd -> %pd
.
\n
"
,
old_dentry
,
new_dentry
);
break
;
case
0x9E
:
error
=
-
ENAMETOOLONG
;
...
...
fs/ncpfs/file.c
浏览文件 @
84eb3532
...
...
@@ -107,8 +107,7 @@ ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
void
*
freepage
;
size_t
freelen
;
DPRINTK
(
"ncp_file_read: enter %s/%s
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
DPRINTK
(
"ncp_file_read: enter %pd2
\n
"
,
dentry
);
pos
=
*
ppos
;
...
...
@@ -166,8 +165,7 @@ ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
file_accessed
(
file
);
DPRINTK
(
"ncp_file_read: exit %s/%s
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
DPRINTK
(
"ncp_file_read: exit %pd2
\n
"
,
dentry
);
outrel:
ncp_inode_close
(
inode
);
return
already_read
?
already_read
:
error
;
...
...
@@ -184,8 +182,7 @@ ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *
int
errno
;
void
*
bouncebuffer
;
DPRINTK
(
"ncp_file_write: enter %s/%s
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
DPRINTK
(
"ncp_file_write: enter %pd2
\n
"
,
dentry
);
if
((
ssize_t
)
count
<
0
)
return
-
EINVAL
;
pos
=
*
ppos
;
...
...
@@ -264,8 +261,7 @@ ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *
i_size_write
(
inode
,
pos
);
mutex_unlock
(
&
inode
->
i_mutex
);
}
DPRINTK
(
"ncp_file_write: exit %s/%s
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
DPRINTK
(
"ncp_file_write: exit %pd2
\n
"
,
dentry
);
outrel:
ncp_inode_close
(
inode
);
return
already_written
?
already_written
:
errno
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录