Lines Matching refs:name
27 * ntfs_lookup_inode_by_name - find an inode in a directory given its name
28 * @dir_ni: ntfs inode of the directory in which to search for the name
29 * @uname: Unicode name for which to search in the directory
30 * @uname_len: length of the name @uname in Unicode characters
31 * @res: return the found file name if necessary (see below)
33 * Look for an inode with name @uname in the directory with inode @dir_ni.
35 * the Unicode name. If the name is found in the directory, the corresponding
51 * reference, the file name type, length and with a copy of the little endian
52 * Unicode file name itself. If we match a file name which is in the DOS name
53 * space, we only return the mft reference and file name type in @res.
54 * ntfs_lookup() then uses this to find the long file name in the inode itself.
84 ntfs_name *name = NULL;
131 * The last entry cannot contain a name. It can however contain
151 * free name and set *res to NULL.
152 * However, if the perfect match is a short file name,
159 if (!name) {
160 name = kmalloc(sizeof(ntfs_name),
162 if (!name) {
167 name->mref = le64_to_cpu(
169 name->type = FILE_NAME_DOS;
170 name->len = 0;
171 *res = name;
173 kfree(name);
183 * insensitive comparison (provided the file name is not in the
184 * POSIX namespace). If the comparison matches, and the name is
187 * comparison matches, and the name is in the DOS namespace, we
188 * only cache the mft reference and the file name type (we set
189 * the name length to zero for simplicity).
201 /* Only one case insensitive matching name allowed. */
202 if (name) {
203 ntfs_error(sb, "Found already allocated name "
215 name = kmalloc(name_size, GFP_NOFS);
216 if (!name) {
220 name->mref = le64_to_cpu(ie->data.dir.indexed_file);
221 name->type = type;
223 name->len = len;
224 memcpy(name->name, ie->key.file_name.file_name,
227 name->len = 0;
228 *res = name;
239 * If uname collates before the name of the current entry, there
240 * is definitely no such name in this index but we might need to
271 * we have got a matching name cached in name in which case return the
275 if (name) {
278 return name->mref;
391 * The last entry cannot contain a name. It can however contain
411 * free name and set *res to NULL.
412 * However, if the perfect match is a short file name,
419 if (!name) {
420 name = kmalloc(sizeof(ntfs_name),
422 if (!name) {
427 name->mref = le64_to_cpu(
429 name->type = FILE_NAME_DOS;
430 name->len = 0;
431 *res = name;
433 kfree(name);
443 * insensitive comparison (provided the file name is not in the
444 * POSIX namespace). If the comparison matches, and the name is
447 * comparison matches, and the name is in the DOS namespace, we
448 * only cache the mft reference and the file name type (we set
449 * the name length to zero for simplicity).
461 /* Only one case insensitive matching name allowed. */
462 if (name) {
463 ntfs_error(sb, "Found already allocated name "
477 name = kmalloc(name_size, GFP_NOFS);
478 if (!name) {
482 name->mref = le64_to_cpu(ie->data.dir.indexed_file);
483 name->type = type;
485 name->len = len;
486 memcpy(name->name, ie->key.file_name.file_name,
489 name->len = 0;
490 *res = name;
501 * If uname collates before the name of the current entry, there
502 * is definitely no such name in this index but we might need to
563 * name cached in name in which case return the mft reference
566 if (name) {
569 return name->mref;
583 if (name) {
584 kfree(name);
601 * ntfs_lookup_inode_by_name - find an inode in a directory given its name
602 * @dir_ni: ntfs inode of the directory in which to search for the name
603 * @uname: Unicode name for which to search in the directory
604 * @uname_len: length of the name @uname in Unicode characters
606 * Look for an inode with name @uname in the directory with inode @dir_ni.
608 * the Unicode name. If the name is found in the directory, the corresponding
682 * The last entry cannot contain a name. It can however contain
688 * If the current entry has a name type of POSIX, the name is
724 * If uname collates before the name of the current entry, there
725 * is definitely no such name in this index but we might need to
869 * The last entry cannot contain a name. It can however contain
875 * If the current entry has a name type of POSIX, the name is
911 * If uname collates before the name of the current entry, there
912 * is definitely no such name in this index but we might need to
997 * @name: buffer to use for the converted name
1000 * Convert the Unicode @name to the loaded NLS and pass it to the @filldir
1014 u8 *name, struct dir_context *actor)
1023 ntfs_debug("Skipping DOS name space entry.");
1036 ie->key.file_name.file_name_length, &name,
1056 "0x%lx, DT_%s.", name, name_len, actor->pos, mref,
1058 if (!dir_emit(actor, name, name_len, mref, dt_type))
1098 u8 *name = NULL;
1118 * Allocate a buffer to store the current name being processed
1121 name = kmalloc(NTFS_MAX_NAME_LEN * NLS_MAX_CHARSET_SIZE + 1, GFP_NOFS);
1122 if (unlikely(!name)) {
1191 /* The last entry cannot contain a name. */
1199 /* Submit the name to the filldir callback. */
1200 rc = ntfs_filldir(vol, ndir, NULL, ie, name, actor);
1373 /* The last entry cannot contain a name. */
1385 * Submit the name to the @filldir callback. Note,
1390 rc = ntfs_filldir(vol, ndir, ia_page, ie, name, actor);
1411 kfree(name);
1424 kfree(name);
1505 na.name = I30;