Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
582d21e5
Commit
582d21e5
authored
May 13, 2008
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] cleanup old checkpatch warnings
Signed-off-by:
Steve French
<
sfrench@us.ibm.com
>
parent
ed5f0370
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
29 deletions
+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
No files found.
fs/cifs/cifsproto.h
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment