Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
3870253e
Commit
3870253e
authored
Jul 08, 2007
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] more whitespace fixes
Signed-off-by:
Steve French
<
sfrench@us.ibm.com
>
parent
790fe579
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
141 additions
and
137 deletions
+141
-137
fs/cifs/netmisc.c
fs/cifs/netmisc.c
+42
-40
fs/cifs/readdir.c
fs/cifs/readdir.c
+82
-81
fs/cifs/sess.c
fs/cifs/sess.c
+5
-4
fs/cifs/smbdes.c
fs/cifs/smbdes.c
+12
-12
No files found.
fs/cifs/netmisc.c
View file @
3870253e
...
...
@@ -7,7 +7,6 @@
* Error mapping routines from Samba libsmb/errormap.c
* Copyright (C) Andrew Tridgell 2001
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
...
...
@@ -67,22 +66,22 @@ static const struct smb_to_posix_error mapping_table_ERRDOS[] = {
{
ERRbadshare
,
-
ETXTBSY
},
{
ERRlock
,
-
EACCES
},
{
ERRunsup
,
-
EINVAL
},
{
ERRnosuchshare
,
-
ENXIO
},
{
ERRnosuchshare
,
-
ENXIO
},
{
ERRfilexists
,
-
EEXIST
},
{
ERRinvparm
,
-
EINVAL
},
{
ERRdiskfull
,
-
ENOSPC
},
{
ERRinvname
,
-
ENOENT
},
{
ERRinvlevel
,
-
EOPNOTSUPP
},
{
ERRinvlevel
,
-
EOPNOTSUPP
},
{
ERRdirnotempty
,
-
ENOTEMPTY
},
{
ERRnotlocked
,
-
ENOLCK
},
{
ERRcancelviolation
,
-
ENOLCK
},
{
ERRalreadyexists
,
-
EEXIST
},
{
ERRmoredata
,
-
EOVERFLOW
},
{
ERReasnotsupported
,
-
EOPNOTSUPP
},
{
ERReasnotsupported
,
-
EOPNOTSUPP
},
{
ErrQuota
,
-
EDQUOT
},
{
ErrNotALink
,
-
ENOLINK
},
{
ERRnetlogonNotStarted
,
-
ENOPROTOOPT
},
{
ErrTooManyLinks
,
-
EMLINK
},
{
ERRnetlogonNotStarted
,
-
ENOPROTOOPT
},
{
ErrTooManyLinks
,
-
EMLINK
},
{
0
,
0
}
};
...
...
@@ -133,13 +132,13 @@ static const struct smb_to_posix_error mapping_table_ERRHRD[] = {
/* returns 0 if invalid address */
int
cifs_inet_pton
(
int
address_family
,
char
*
cp
,
void
*
dst
)
cifs_inet_pton
(
int
address_family
,
char
*
cp
,
void
*
dst
)
{
int
ret
=
0
;
/* calculate length by finding first slash or NULL */
/* BB Should we convert '/' slash to '\' here since it seems already
done
before this */
/* BB Should we convert '/' slash to '\' here since it seems already
* done
before this */
if
(
address_family
==
AF_INET
)
{
ret
=
in4_pton
(
cp
,
-
1
/* len */
,
dst
,
'\\'
,
NULL
);
}
else
if
(
address_family
==
AF_INET6
)
{
...
...
@@ -332,8 +331,8 @@ static const struct {
ERRHRD
,
ERRgeneral
,
NT_STATUS_FILE_INVALID
},
{
ERRHRD
,
ERRgeneral
,
NT_STATUS_ALLOTTED_SPACE_EXCEEDED
},
/* { This NT error code was 'sqashed'
from NT_STATUS_INSUFFICIENT_RESOURCES to
NT_STATUS_INSUFF_SERVER_RESOURCES
during the session setup } */
from NT_STATUS_INSUFFICIENT_RESOURCES to
NT_STATUS_INSUFF_SERVER_RESOURCES
during the session setup } */
{
ERRDOS
,
ERRnomem
,
NT_STATUS_INSUFFICIENT_RESOURCES
},
{
ERRDOS
,
ERRbadpath
,
NT_STATUS_DFS_EXIT_PATH_FOUND
},
{
...
...
@@ -577,8 +576,8 @@ static const struct {
ERRDOS
,
19
,
NT_STATUS_TOO_LATE
},
{
ERRDOS
,
ERRnoaccess
,
NT_STATUS_NO_TRUST_LSA_SECRET
},
/* { This NT error code was 'sqashed'
from NT_STATUS_NO_TRUST_SAM_ACCOUNT to
NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE
during the session setup } */
from NT_STATUS_NO_TRUST_SAM_ACCOUNT to
NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE
during the session setup } */
{
ERRDOS
,
ERRnoaccess
,
NT_STATUS_NO_TRUST_SAM_ACCOUNT
},
{
ERRDOS
,
ERRnoaccess
,
NT_STATUS_TRUSTED_DOMAIN_FAILURE
},
{
...
...
@@ -728,7 +727,7 @@ cifs_print_status(__u32 status_code)
if
(((
nt_errs
[
idx
].
nt_errcode
)
&
0xFFFFFF
)
==
(
status_code
&
0xFFFFFF
))
{
printk
(
KERN_NOTICE
"Status code returned 0x%08x %s
\n
"
,
status_code
,
nt_errs
[
idx
].
nt_errstr
);
status_code
,
nt_errs
[
idx
].
nt_errstr
);
}
idx
++
;
}
...
...
@@ -771,7 +770,8 @@ map_smb_to_linux_error(struct smb_hdr *smb)
return
0
;
if
(
smb
->
Flags2
&
SMBFLG2_ERR_STATUS
)
{
/* translate the newer STATUS codes to old style errors and then to POSIX errors */
/* translate the newer STATUS codes to old style SMB errors
* and then to POSIX errors */
__u32
err
=
le32_to_cpu
(
smb
->
Status
.
CifsError
);
if
(
cifsFYI
&
CIFS_RC
)
cifs_print_status
(
err
);
...
...
@@ -784,7 +784,7 @@ map_smb_to_linux_error(struct smb_hdr *smb)
/* old style errors */
/* DOS class smb error codes - map DOS */
if
(
smberrclass
==
ERRDOS
)
{
/* one
byte field no need to byte reverse */
if
(
smberrclass
==
ERRDOS
)
{
/* 1
byte field no need to byte reverse */
for
(
i
=
0
;
i
<
sizeof
(
mapping_table_ERRDOS
)
/
...
...
@@ -795,7 +795,7 @@ map_smb_to_linux_error(struct smb_hdr *smb)
rc
=
mapping_table_ERRDOS
[
i
].
posix_code
;
break
;
}
/* else try
the next error mapping one to see if it will
match */
/* else try
next error mapping one to see if
match */
}
}
else
if
(
smberrclass
==
ERRSRV
)
{
/* server class of error codes */
for
(
i
=
0
;
...
...
@@ -808,14 +808,16 @@ map_smb_to_linux_error(struct smb_hdr *smb)
rc
=
mapping_table_ERRSRV
[
i
].
posix_code
;
break
;
}
/* else try
the next error mapping one to see if it will
match */
/* else try
next error mapping to see if
match */
}
}
/* else ERRHRD class errors or junk - return EIO */
cFYI
(
1
,
(
" !!Mapping smb error code %d to POSIX err %d !!"
,
smberrcode
,
rc
));
cFYI
(
1
,
(
" !!Mapping smb error code %d to POSIX err %d !!"
,
smberrcode
,
rc
));
/* generic corrective action e.g. reconnect SMB session on ERRbaduid could be added */
/* generic corrective action e.g. reconnect SMB session on
* ERRbaduid could be added */
return
rc
;
}
...
...
@@ -885,20 +887,20 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time)
SMB_TIME
*
st
=
(
SMB_TIME
*
)
&
time
;
SMB_DATE
*
sd
=
(
SMB_DATE
*
)
&
date
;
cFYI
(
1
,
(
"date %d time %d"
,
date
,
time
));
cFYI
(
1
,
(
"date %d time %d"
,
date
,
time
));
sec
=
2
*
st
->
TwoSeconds
;
min
=
st
->
Minutes
;
if
((
sec
>
59
)
||
(
min
>
59
))
cERROR
(
1
,(
"illegal time min %d sec %d"
,
min
,
sec
));
cERROR
(
1
,
(
"illegal time min %d sec %d"
,
min
,
sec
));
sec
+=
(
min
*
60
);
sec
+=
60
*
60
*
st
->
Hours
;
if
(
st
->
Hours
>
24
)
cERROR
(
1
,
(
"illegal hours %d"
,
st
->
Hours
));
cERROR
(
1
,
(
"illegal hours %d"
,
st
->
Hours
));
days
=
sd
->
Day
;
month
=
sd
->
Month
;
if
((
days
>
31
)
||
(
month
>
12
))
cERROR
(
1
,(
"illegal date, month %d day: %d"
,
month
,
days
));
cERROR
(
1
,
(
"illegal date, month %d day: %d"
,
month
,
days
));
month
-=
1
;
days
+=
total_days_of_prev_months
[
month
];
days
+=
3652
;
/* account for difference in days between 1980 and 1970 */
...
...
fs/cifs/readdir.c
View file @
3870253e
This diff is collapsed.
Click to expand it.
fs/cifs/sess.c
View file @
3870253e
...
...
@@ -75,7 +75,7 @@ static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)
return
capabilities
;
}
static
void
unicode_ssetup_strings
(
char
**
pbcc_area
,
struct
cifsSesInfo
*
ses
,
static
void
unicode_ssetup_strings
(
char
**
pbcc_area
,
struct
cifsSesInfo
*
ses
,
const
struct
nls_table
*
nls_cp
)
{
char
*
bcc_ptr
=
*
pbcc_area
;
...
...
@@ -130,7 +130,7 @@ static void unicode_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses,
*
pbcc_area
=
bcc_ptr
;
}
static
void
ascii_ssetup_strings
(
char
**
pbcc_area
,
struct
cifsSesInfo
*
ses
,
static
void
ascii_ssetup_strings
(
char
**
pbcc_area
,
struct
cifsSesInfo
*
ses
,
const
struct
nls_table
*
nls_cp
)
{
char
*
bcc_ptr
=
*
pbcc_area
;
...
...
@@ -468,7 +468,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
/* memcpy(bcc_ptr, (char *)ntlm_session_key,LM2_SESS_KEY_SIZE);
bcc_ptr += LM2_SESS_KEY_SIZE; */
memcpy
(
bcc_ptr
,
(
char
*
)
v2_sess_key
,
sizeof
(
struct
ntlmv2_resp
));
memcpy
(
bcc_ptr
,
(
char
*
)
v2_sess_key
,
sizeof
(
struct
ntlmv2_resp
));
bcc_ptr
+=
sizeof
(
struct
ntlmv2_resp
);
kfree
(
v2_sess_key
);
if
(
ses
->
capabilities
&
CAP_UNICODE
)
{
...
...
fs/cifs/smbdes.c
View file @
3870253e
...
...
@@ -153,7 +153,7 @@ static uchar sbox[8][4][16] = {
};
static
void
permute
(
char
*
out
,
char
*
in
,
uchar
*
p
,
int
n
)
permute
(
char
*
out
,
char
*
in
,
uchar
*
p
,
int
n
)
{
int
i
;
for
(
i
=
0
;
i
<
n
;
i
++
)
...
...
@@ -202,18 +202,18 @@ dohash(char *out, char *in, char *key, int forw)
char
*
rl
;
/* Have to reduce stack usage */
pk1
=
kmalloc
(
56
+
56
+
64
+
64
,
GFP_KERNEL
);
if
(
pk1
==
NULL
)
pk1
=
kmalloc
(
56
+
56
+
64
+
64
,
GFP_KERNEL
);
if
(
pk1
==
NULL
)
return
;
ki
=
kmalloc
(
16
*
48
,
GFP_KERNEL
);
if
(
ki
==
NULL
)
{
if
(
ki
==
NULL
)
{
kfree
(
pk1
);
return
;
}
cd
=
pk1
+
56
;
pd1
=
cd
+
56
;
pd1
=
cd
+
56
;
rl
=
pd1
+
64
;
permute
(
pk1
,
key
,
perm1
,
56
);
...
...
@@ -247,7 +247,7 @@ dohash(char *out, char *in, char *key, int forw)
char
*
r2
;
/* r2[32] */
er
=
kmalloc
(
48
+
48
+
32
+
32
+
32
,
GFP_KERNEL
);
if
(
er
==
NULL
)
{
if
(
er
==
NULL
)
{
kfree
(
pk1
);
kfree
(
ki
);
return
;
...
...
@@ -327,8 +327,8 @@ smbhash(unsigned char *out, unsigned char *in, unsigned char *key, int forw)
char
*
keyb
;
/* keyb[64] */
unsigned
char
key2
[
8
];
outb
=
kmalloc
(
64
*
3
,
GFP_KERNEL
);
if
(
outb
==
NULL
)
outb
=
kmalloc
(
64
*
3
,
GFP_KERNEL
);
if
(
outb
==
NULL
)
return
;
inb
=
outb
+
64
;
...
...
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