Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
7ae3006f
Commit
7ae3006f
authored
Oct 30, 2012
by
Pavel Shilovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 3.4 sources from stable (v3.4.16)
parent
e0bc5ebd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
cifs_unicode.c
sources/3.4/cifs_unicode.c
+23
-1
connect.c
sources/3.4/connect.c
+9
-0
No files found.
sources/3.4/cifs_unicode.c
View file @
7ae3006f
...
...
@@ -203,6 +203,27 @@ cifs_strtoUTF16(__le16 *to, const char *from, int len,
int
i
;
wchar_t
wchar_to
;
/* needed to quiet sparse */
/* special case for utf8 to handle no plane0 chars */
if
(
!
strcmp
(
codepage
->
charset
,
"utf8"
))
{
/*
* convert utf8 -> utf16, we assume we have enough space
* as caller should have assumed conversion does not overflow
* in destination len is length in wchar_t units (16bits)
*/
i
=
utf8s_to_utf16s
(
from
,
len
,
UTF16_LITTLE_ENDIAN
,
(
wchar_t
*
)
to
,
len
);
/* if success terminate and exit */
if
(
i
>=
0
)
goto
success
;
/*
* if fails fall back to UCS encoding as this
* function should not return negative values
* currently can fail only if source contains
* invalid encoded characters
*/
}
for
(
i
=
0
;
len
&&
*
from
;
i
++
,
from
+=
charlen
,
len
-=
charlen
)
{
charlen
=
codepage
->
char2uni
(
from
,
len
,
&
wchar_to
);
if
(
charlen
<
1
)
{
...
...
@@ -215,6 +236,7 @@ cifs_strtoUTF16(__le16 *to, const char *from, int len,
put_unaligned_le16
(
wchar_to
,
&
to
[
i
]);
}
success:
put_unaligned_le16
(
0
,
&
to
[
i
]);
return
i
;
}
...
...
@@ -328,6 +350,6 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen,
}
ctoUTF16_out:
return
i
;
return
j
;
}
sources/3.4/connect.c
View file @
7ae3006f
...
...
@@ -70,6 +70,7 @@ enum {
/* Mount options that take no arguments */
Opt_user_xattr
,
Opt_nouser_xattr
,
Opt_forceuid
,
Opt_noforceuid
,
Opt_forcegid
,
Opt_noforcegid
,
Opt_noblocksend
,
Opt_noautotune
,
Opt_hard
,
Opt_soft
,
Opt_perm
,
Opt_noperm
,
Opt_mapchars
,
Opt_nomapchars
,
Opt_sfu
,
...
...
@@ -121,6 +122,8 @@ static const match_table_t cifs_mount_option_tokens = {
{
Opt_nouser_xattr
,
"nouser_xattr"
},
{
Opt_forceuid
,
"forceuid"
},
{
Opt_noforceuid
,
"noforceuid"
},
{
Opt_forcegid
,
"forcegid"
},
{
Opt_noforcegid
,
"noforcegid"
},
{
Opt_noblocksend
,
"noblocksend"
},
{
Opt_noautotune
,
"noautotune"
},
{
Opt_hard
,
"hard"
},
...
...
@@ -1288,6 +1291,12 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
case
Opt_noforceuid
:
override_uid
=
0
;
break
;
case
Opt_forcegid
:
override_gid
=
1
;
break
;
case
Opt_noforcegid
:
override_gid
=
0
;
break
;
case
Opt_noblocksend
:
vol
->
noblocksnd
=
1
;
break
;
...
...
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