Linux Kernel
3.7.1
|
Go to the source code of this file.
bool ntfs_are_names_equal | ( | const ntfschar * | s1, |
size_t | s1_len, | ||
const ntfschar * | s2, | ||
size_t | s2_len, | ||
const IGNORE_CASE_BOOL | ic, | ||
const ntfschar * | upcase, | ||
const u32 | upcase_size | ||
) |
ntfs_are_names_equal - compare two Unicode names for equality : name to compare to : length in Unicode characters of : name to compare to : length in Unicode characters of : ignore case bool : upcase table (only if == IGNORE_CASE) : length in Unicode characters of (if present)
Compare the names and and return 'true' (1) if the names are identical, or 'false' (0) if they are not identical. If is IGNORE_CASE, the table is used to performa a case insensitive comparison.
int ntfs_nlstoucs | ( | const ntfs_volume * | vol, |
const char * | ins, | ||
const int | ins_len, | ||
ntfschar ** | outs | ||
) |
ntfs_nlstoucs - convert NLS string to little endian Unicode string : ntfs volume which we are working with : input NLS string buffer : length of input string in bytes : on return contains the allocated output Unicode string buffer
Convert the input string , which is in whatever format the loaded NLS map dictates, into a little endian, 2-byte Unicode string.
This function allocates the string and the caller is responsible for calling kmem_cache_free(ntfs_name_cache, *); when finished with it.
On success the function returns the number of Unicode characters written to the output string * (>= 0), not counting the terminating Unicode NULL character. * is set to the allocated output string buffer.
On error, a negative number corresponding to the error code is returned. In that case the output string is not allocated. Both * and * are then undefined.
This might look a bit odd due to fast path optimization...
int ntfs_ucsncasecmp | ( | const ntfschar * | s1, |
const ntfschar * | s2, | ||
size_t | n, | ||
const ntfschar * | upcase, | ||
const u32 | upcase_size | ||
) |
ntfs_ucsncasecmp - compare two little endian Unicode strings, ignoring case : first string : second string
: maximum unicode characters to compare : upcase table : upcase table size in Unicode characters
Compare the first
characters of the Unicode strings and , ignoring case. The strings in little endian format and appropriate le16_to_cpu() conversion is performed on non-little endian machines.
Each character is uppercased using the table before the comparison.
The function returns an integer less than, equal to, or greater than zero if (or the first
Unicode characters thereof) is found, respectively, to be less than, to match, or be greater than .
ntfs_ucsncmp - compare two little endian Unicode strings : first string : second string
: maximum unicode characters to compare
Compare the first
characters of the Unicode strings and , The strings in little endian format and appropriate le16_to_cpu() conversion is performed on non-little endian machines.
The function returns an integer less than, equal to, or greater than zero if (or the first
Unicode characters thereof) is found, respectively, to be less than, to match, or be greater than .
int ntfs_ucstonls | ( | const ntfs_volume * | vol, |
const ntfschar * | ins, | ||
const int | ins_len, | ||
unsigned char ** | outs, | ||
int | outs_len | ||
) |
ntfs_ucstonls - convert little endian Unicode string to NLS string : ntfs volume which we are working with : input Unicode string buffer : length of input string in Unicode characters : on return contains the (allocated) output NLS string buffer : length of output string buffer in bytes
Convert the input little endian, 2-byte Unicode string , of length into the string format dictated by the loaded NLS.
If * is NULL, this function allocates the string and the caller is responsible for calling kfree(*); when finished with it. In this case is ignored and can be 0.
On success the function returns the number of bytes written to the output string * (>= 0), not counting the terminating NULL byte. If the output string buffer was allocated, * is set to it.
On error, a negative number corresponding to the error code is returned. In that case the output string is not allocated. The contents of * are then undefined.
This might look a bit odd due to fast path optimization...