diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-08 00:13:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-08 00:13:24 -0400 |
commit | d7a5926978cb109b2db5985c65086483caf9e226 (patch) | |
tree | 0431ca74aec312ed69dea21a7039b4c734307723 /include | |
parent | 8c9ed899b44c19e81859fbb0e9d659fe2f8630fc (diff) | |
parent | 90e4ee5d311d4e0729daa676b1d7f754265b5874 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (32 commits)
[CIFS] Fix double list addition in cifs posix open code
[CIFS] Allow raw ntlmssp code to be enabled with sec=ntlmssp
[CIFS] Fix SMB uid in NTLMSSP authenticate request
[CIFS] NTLMSSP reenabled after move from connect.c to sess.c
[CIFS] Remove sparse warning
[CIFS] remove checkpatch warning
[CIFS] Fix final user of old string conversion code
[CIFS] remove cifs_strfromUCS_le
[CIFS] NTLMSSP support moving into new file, old dead code removed
[CIFS] Fix endian conversion of vcnum field
[CIFS] Remove trailing whitespace
[CIFS] Remove sparse endian warnings
[CIFS] Add remaining ntlmssp flags and standardize field names
[CIFS] Fix build warning
cifs: fix length handling in cifs_get_name_from_search_buf
[CIFS] Remove unneeded QuerySymlink call and fix mapping for unmapped status
[CIFS] rename cifs_strndup to cifs_strndup_from_ucs
Added loop check when mounting DFS tree.
Enable dfs submounts to handle remote referrals.
[CIFS] Remove older session setup implementation
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nls.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/nls.h b/include/linux/nls.h index 6a882208301a..52b1a76c1b43 100644 --- a/include/linux/nls.h +++ b/include/linux/nls.h | |||
@@ -58,6 +58,25 @@ static inline int nls_strnicmp(struct nls_table *t, const unsigned char *s1, | |||
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | /* | ||
62 | * nls_nullsize - return length of null character for codepage | ||
63 | * @codepage - codepage for which to return length of NULL terminator | ||
64 | * | ||
65 | * Since we can't guarantee that the null terminator will be a particular | ||
66 | * length, we have to check against the codepage. If there's a problem | ||
67 | * determining it, assume a single-byte NULL terminator. | ||
68 | */ | ||
69 | static inline int | ||
70 | nls_nullsize(const struct nls_table *codepage) | ||
71 | { | ||
72 | int charlen; | ||
73 | char tmp[NLS_MAX_CHARSET_SIZE]; | ||
74 | |||
75 | charlen = codepage->uni2char(0, tmp, NLS_MAX_CHARSET_SIZE); | ||
76 | |||
77 | return charlen > 0 ? charlen : 1; | ||
78 | } | ||
79 | |||
61 | #define MODULE_ALIAS_NLS(name) MODULE_ALIAS("nls_" __stringify(name)) | 80 | #define MODULE_ALIAS_NLS(name) MODULE_ALIAS("nls_" __stringify(name)) |
62 | 81 | ||
63 | #endif /* _LINUX_NLS_H */ | 82 | #endif /* _LINUX_NLS_H */ |