Lines Matching refs:name

108     char *name;
109 /* If non-null, this is the real name of the file in the underlying storage.
110 * This may differ from the field "name" only by case.
111 * strlen(actual_name) will always equal strlen(name), so it is safe to use
153 TRACE("ACQUIRE %p (%s) rc=%d\n", node, node->name, node->refcount);
160 TRACE("RELEASE %p (%s) rc=%d\n", node, node->name, node->refcount);
164 TRACE("DESTROY %p (%s)\n", node, node->name);
168 memset(node->name, 0xef, node->namelen);
169 free(node->name);
225 const char* name = node->actual_name ? node->actual_name : node->name;
226 memcpy(buf + pathlen, name, namelen + 1); /* include trailing \0 */
233 * the buffer to the path that the file would have, assuming the name were case-sensitive.
235 * Populates 'buf' with the path and returns the actual name (within 'buf') on success,
238 static char* find_file_within(const char* path, const char* name,
242 size_t namelen = strlen(name);
253 memcpy(actual, name, namelen + 1);
263 if (!strcasecmp(entry->d_name, name)) {
264 /* we have a match - replace the name, don't need to copy the null again */
304 struct node *parent, const char *name, const char* actual_name)
307 size_t namelen = strlen(name);
313 node->name = malloc(namelen + 1);
314 if (!node->name) {
318 memcpy(node->name, name, namelen + 1);
319 if (strcmp(name, actual_name)) {
322 free(node->name);
336 static int rename_node_locked(struct node *node, const char *name,
339 size_t namelen = strlen(name);
340 int need_actual_name = strcmp(name, actual_name);
342 /* make the storage bigger without actually changing the name
345 char* new_name = realloc(node->name, namelen + 1);
349 node->name = new_name;
359 /* update the name, taking care to allocate storage before overwriting the old name */
372 memcpy(node->name, name, namelen + 1);
396 static struct node *lookup_child_by_name_locked(struct node *node, const char *name)
403 if (!strcmp(name, node->name)) {
412 const char* name, const char* actual_name)
414 struct node* child = lookup_child_by_name_locked(parent, name);
418 child = create_node_locked(fuse, parent, name, actual_name);
434 fuse->root.name = strdup(source_path);
468 struct node* parent, const char* name, const char* actual_name,
480 node = acquire_or_create_child_locked(fuse, parent, name, actual_name);
513 const struct fuse_in_header *hdr, const char* name)
523 TRACE("[%d] LOOKUP %s @ %llx (%s)\n", handler->token, name, hdr->nodeid,
524 parent_node ? parent_node->name : "?");
527 if (!parent_node || !(actual_name = find_file_within(parent_path, name,
531 return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path);
542 hdr->nodeid, node ? node->name : "?");
562 req->getattr_flags, req->fh, hdr->nodeid, node ? node->name : "?");
581 req->fh, req->valid, hdr->nodeid, node ? node->name : "?");
630 const struct fuse_in_header* hdr, const struct fuse_mknod_in* req, const char* name)
641 name, req->mode, hdr->nodeid, parent_node ? parent_node->name : "?");
644 if (!parent_node || !(actual_name = find_file_within(parent_path, name,
652 return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path);
656 const struct fuse_in_header* hdr, const struct fuse_mkdir_in* req, const char* name)
667 name, req->mode, hdr->nodeid, parent_node ? parent_node->name : "?");
670 if (!parent_node || !(actual_name = find_file_within(parent_path, name,
678 return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path);
682 const struct fuse_in_header* hdr, const char* name)
692 name, hdr->nodeid, parent_node ? parent_node->name : "?");
695 if (!parent_node || !find_file_within(parent_path, name,
706 const struct fuse_in_header* hdr, const char* name)
716 name, hdr->nodeid, parent_node ? parent_node->name : "?");
719 if (!parent_node || !find_file_within(parent_path, name,
750 hdr->nodeid, old_parent_node ? old_parent_node->name : "?",
751 req->newdir, new_parent_node ? new_parent_node->name : "?");
812 req->flags, hdr->nodeid, node ? node->name : "?");
895 if (statfs(fuse->root.name, &stat) < 0) {
956 hdr->nodeid, node ? node->name : "?");
1000 memcpy(fde->name, de->d_name, fde->namelen + 1);
1040 const char* name = data;
1041 return handle_lookup(fuse, handler, hdr, name);
1063 const char *name = ((const char*) data) + sizeof(*req);
1064 return handle_mknod(fuse, handler, hdr, req, name);
1069 const char *name = ((const char*) data) + sizeof(*req);
1070 return handle_mkdir(fuse, handler, hdr, req, name);
1074 const char* name = data;
1075 return handle_unlink(fuse, handler, hdr, name);
1079 const char* name = data;
1080 return handle_rmdir(fuse, handler, hdr, name);