Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
582d21e5
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
152
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,发现更多精彩内容 >>
提交
582d21e5
编写于
5月 13, 2008
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] cleanup old checkpatch warnings
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
ed5f0370
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
45 addition
and
29 deletion
+45
-29
fs/cifs/cifsproto.h
fs/cifs/cifsproto.h
+3
-3
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+33
-18
fs/cifs/connect.c
fs/cifs/connect.c
+4
-3
fs/cifs/netmisc.c
fs/cifs/netmisc.c
+3
-3
fs/cifs/ntlmssp.h
fs/cifs/ntlmssp.h
+2
-2
未找到文件。
fs/cifs/cifsproto.h
浏览文件 @
582d21e5
...
...
@@ -93,7 +93,7 @@ extern struct timespec cnvrtDosUnixTm(__u16 date, __u16 time);
extern
int
cifs_get_inode_info
(
struct
inode
**
pinode
,
const
unsigned
char
*
search_path
,
FILE_ALL_INFO
*
pfile_info
,
FILE_ALL_INFO
*
pfile_info
,
struct
super_block
*
sb
,
int
xid
,
const
__u16
*
pfid
);
extern
int
cifs_get_inode_info_unix
(
struct
inode
**
pinode
,
const
unsigned
char
*
search_path
,
...
...
@@ -130,7 +130,7 @@ extern int CIFSFindClose(const int, struct cifsTconInfo *tcon,
extern
int
CIFSSMBQPathInfo
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
unsigned
char
*
searchName
,
FILE_ALL_INFO
*
findData
,
FILE_ALL_INFO
*
findData
,
int
legacy
/* whether to use old info level */
,
const
struct
nls_table
*
nls_codepage
,
int
remap
);
extern
int
SMBQueryInformation
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
...
...
@@ -141,7 +141,7 @@ extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon,
extern
int
CIFSSMBUnixQPathInfo
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
unsigned
char
*
searchName
,
FILE_UNIX_BASIC_INFO
*
pFindData
,
FILE_UNIX_BASIC_INFO
*
pFindData
,
const
struct
nls_table
*
nls_codepage
,
int
remap
);
extern
int
CIFSGetDFSRefer
(
const
int
xid
,
struct
cifsSesInfo
*
ses
,
...
...
fs/cifs/cifssmb.c
浏览文件 @
582d21e5
...
...
@@ -1247,7 +1247,7 @@ SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon,
}
else
{
/* BB verify if wct == 15 */
/* *pOplock = pSMBr->OplockLevel; */
/* BB take from action field BB
*/
/* *pOplock = pSMBr->OplockLevel; */
/* BB take from action field
*/
*
netfid
=
pSMBr
->
Fid
;
/* cifs fid stays in le */
/* Let caller know file was created so we can set the mode. */
...
...
@@ -1944,7 +1944,7 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
/* protocol requires ASCII signature byte on Unicode string */
pSMB
->
OldFileName
[
name_len
+
1
]
=
0x00
;
name_len2
=
cifsConvertToUCS
((
__le16
*
)
&
pSMB
->
OldFileName
[
name_len
+
2
],
cifsConvertToUCS
((
__le16
*
)
&
pSMB
->
OldFileName
[
name_len
+
2
],
toName
,
PATH_MAX
,
nls_codepage
,
remap
);
name_len2
+=
1
/* trailing null */
+
1
/* Signature word */
;
name_len2
*=
2
;
/* convert to bytes */
...
...
@@ -2925,7 +2925,8 @@ CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon,
}
params
=
6
+
name_len
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
/* BB find max SMB size from sess */
/* BB find max SMB size from sess */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -3322,7 +3323,8 @@ CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon,
params
=
2
/* level */
+
4
/* reserved */
+
name_len
/* includes NUL */
;
pSMB
->
TotalDataCount
=
0
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
4000
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
4000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -3388,7 +3390,7 @@ CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon,
int
CIFSSMBUnixQPathInfo
(
const
int
xid
,
struct
cifsTconInfo
*
tcon
,
const
unsigned
char
*
searchName
,
FILE_UNIX_BASIC_INFO
*
pFindData
,
FILE_UNIX_BASIC_INFO
*
pFindData
,
const
struct
nls_table
*
nls_codepage
,
int
remap
)
{
/* SMB_QUERY_FILE_UNIX_BASIC */
...
...
@@ -3922,7 +3924,8 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
pSMB
->
DataCount
=
0
;
pSMB
->
DataOffset
=
0
;
pSMB
->
MaxParameterCount
=
0
;
pSMB
->
MaxDataCount
=
cpu_to_le16
(
4000
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
4000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -4230,7 +4233,8 @@ CIFSSMBQFSAttributeInfo(const int xid, struct cifsTconInfo *tcon)
params
=
2
;
/* level */
pSMB
->
TotalDataCount
=
0
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -4299,7 +4303,8 @@ CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon)
params
=
2
;
/* level */
pSMB
->
TotalDataCount
=
0
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -4370,7 +4375,8 @@ CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon)
pSMB
->
DataCount
=
0
;
pSMB
->
DataOffset
=
0
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
100
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
100
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -4445,7 +4451,8 @@ CIFSSMBSetFSUnixInfo(const int xid, struct cifsTconInfo *tcon, __u64 cap)
offset
=
param_offset
+
params
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
4
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
100
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
100
);
pSMB
->
SetupCount
=
1
;
pSMB
->
Reserved3
=
0
;
pSMB
->
SubCommand
=
cpu_to_le16
(
TRANS2_SET_FS_INFORMATION
);
...
...
@@ -4513,7 +4520,8 @@ CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon,
pSMB
->
DataCount
=
0
;
pSMB
->
DataOffset
=
0
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
100
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
100
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -4703,7 +4711,8 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
count
=
sizeof
(
struct
file_end_of_file_info
);
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
/* BB find max SMB PDU from sess */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
pSMB
->
SetupCount
=
1
;
pSMB
->
Reserved3
=
0
;
pSMB
->
SubCommand
=
cpu_to_le16
(
TRANS2_SET_FILE_INFORMATION
);
...
...
@@ -4790,7 +4799,8 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon,
count
=
sizeof
(
FILE_BASIC_INFO
);
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
/* BB find max SMB PDU from sess */
/* BB find max SMB PDU from sess */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
pSMB
->
SetupCount
=
1
;
pSMB
->
Reserved3
=
0
;
pSMB
->
SubCommand
=
cpu_to_le16
(
TRANS2_SET_FILE_INFORMATION
);
...
...
@@ -4857,7 +4867,8 @@ CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon, const char *fileName,
params
=
6
+
name_len
;
count
=
sizeof
(
FILE_BASIC_INFO
);
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -4987,7 +4998,8 @@ CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon,
params
=
6
+
name_len
;
count
=
sizeof
(
FILE_UNIX_BASIC_INFO
);
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -5170,7 +5182,8 @@ CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon,
params
=
2
/* level */
+
4
/* reserved */
+
name_len
/* includes NUL */
;
pSMB
->
TotalDataCount
=
0
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
4000
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
4000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -5318,7 +5331,8 @@ ssize_t CIFSSMBQueryEA(const int xid, struct cifsTconInfo *tcon,
params
=
2
/* level */
+
4
/* reserved */
+
name_len
/* includes NUL */
;
pSMB
->
TotalDataCount
=
0
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
4000
);
/* BB find exact max SMB PDU from sess structure BB */
/* BB find exact max SMB PDU from sess structure BB */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
4000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
@@ -5476,7 +5490,8 @@ CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, const char *fileName,
count
=
sizeof
(
*
parm_data
)
+
ea_value_len
+
name_len
;
pSMB
->
MaxParameterCount
=
cpu_to_le16
(
2
);
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
/* BB find max SMB size from sess */
/* BB find max SMB PDU from sess */
pSMB
->
MaxDataCount
=
cpu_to_le16
(
1000
);
pSMB
->
MaxSetupCount
=
0
;
pSMB
->
Reserved
=
0
;
pSMB
->
Flags
=
0
;
...
...
fs/cifs/connect.c
浏览文件 @
582d21e5
...
...
@@ -1820,7 +1820,7 @@ convert_delimiter(char *path, char delim)
if
(
path
==
NULL
)
return
;
if
(
delim
==
'/'
)
if
(
delim
==
'/'
)
old_delim
=
'\\'
;
else
old_delim
=
'/'
;
...
...
@@ -2321,9 +2321,10 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses,
user
=
ses
->
userName
;
domain
=
ses
->
domainName
;
smb_buffer
=
cifs_buf_get
();
if
(
smb_buffer
==
NULL
)
{
if
(
smb_buffer
==
NULL
)
return
-
ENOMEM
;
}
smb_buffer_response
=
smb_buffer
;
pSMBr
=
pSMB
=
(
SESSION_SETUP_ANDX
*
)
smb_buffer
;
...
...
fs/cifs/netmisc.c
浏览文件 @
582d21e5
...
...
@@ -141,11 +141,11 @@ cifs_inet_pton(const int address_family, const char *cp, void *dst)
int
ret
=
0
;
/* calculate length by finding first slash or NULL */
if
(
address_family
==
AF_INET
)
{
if
(
address_family
==
AF_INET
)
ret
=
in4_pton
(
cp
,
-
1
/* len */
,
dst
,
'\\'
,
NULL
);
}
else
if
(
address_family
==
AF_INET6
)
{
else
if
(
address_family
==
AF_INET6
)
ret
=
in6_pton
(
cp
,
-
1
/* len */
,
dst
,
'\\'
,
NULL
);
}
cFYI
(
DBG2
,
(
"address conversion returned %d for %s"
,
ret
,
cp
));
if
(
ret
>
0
)
ret
=
1
;
...
...
fs/cifs/ntlmssp.h
浏览文件 @
582d21e5
...
...
@@ -64,7 +64,7 @@ typedef struct _SECURITY_BUFFER {
}
__attribute__
((
packed
))
SECURITY_BUFFER
;
typedef
struct
_NEGOTIATE_MESSAGE
{
__u8
Signature
[
sizeof
(
NTLMSSP_SIGNATURE
)];
__u8
Signature
[
sizeof
(
NTLMSSP_SIGNATURE
)];
__le32
MessageType
;
/* 1 */
__le32
NegotiateFlags
;
SECURITY_BUFFER
DomainName
;
/* RFC 1001 style and ASCII */
...
...
@@ -74,7 +74,7 @@ typedef struct _NEGOTIATE_MESSAGE {
}
__attribute__
((
packed
))
NEGOTIATE_MESSAGE
,
*
PNEGOTIATE_MESSAGE
;
typedef
struct
_CHALLENGE_MESSAGE
{
__u8
Signature
[
sizeof
(
NTLMSSP_SIGNATURE
)];
__u8
Signature
[
sizeof
(
NTLMSSP_SIGNATURE
)];
__le32
MessageType
;
/* 2 */
SECURITY_BUFFER
TargetName
;
__le32
NegotiateFlags
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录