Lines Matching refs:name

153 				put_module(volume->file_system->info.name);
749 Accepts a file system name of the form "bfs" or "file_systems/bfs/v1".
756 char name[B_FILE_NAME_LENGTH];
758 // construct module name if we didn't get one
760 snprintf(name, sizeof(name), "file_systems/%s/v1", fsName);
765 if (get_module(fsName ? fsName : name, (module_info**)&info) != B_OK)
772 /*! Accepts a file system name of the form "bfs" or "file_systems/bfs/v1"
773 and returns a compatible fs_info.fsh_name name ("bfs" in both cases).
774 The name is allocated for you, and you have to free() it when you're
784 // the name already seems to be the module's file name
791 // this doesn't seem to be a valid name, but well...
797 char* name = (char*)malloc(end + 1 - fsName);
798 if (name == NULL)
801 strlcpy(name, fsName, end + 1 - fsName);
802 return name;
807 layer and returns the file system name for the specified layer.
808 The name is allocated for you, and you have to free() it when you're
811 name for the specified layer.
1989 /*! \brief Gets the directory path and leaf name for a given path.
1993 the leaf name of the original entry is written.
1994 Neither the returned path nor the leaf name can be expected to be
1999 \param filename The buffer into which the leaf name will be written.
2002 name is longer than \c B_FILE_NAME_LENGTH, or \c B_ENTRY_NOT_FOUND,
2003 if the given path name is empty.
2051 entry_ref_to_vnode(dev_t mountID, ino_t directoryID, const char* name,
2055 if (strlcpy(clonedName, name, B_FILE_NAME_LENGTH) >= B_FILE_NAME_LENGTH)
2070 /*! Looks up the entry with name \a name in the directory represented by \a dir
2075 lookup_dir_entry(struct vnode* dir, const char* name, struct vnode** _vnode)
2080 if (dir->mount->entry_cache.Lookup(dir->id, name, id, missing)) {
2085 status_t status = FS_CALL(dir, lookup, name, &id);
2101 // ktrace_printf("lookup_dir_entry(): dir: %p (%ld, %lld), name: \"%s\" -> "
2102 // "%p (%ld, %lld)", dir, dir->mount->id, dir->id, name, *_vnode,
2112 If the function returns successfully, \a path contains the name of the last path
2376 /*! \brief Retrieves the directory vnode and the leaf name of an entry referred
2395 the leaf name of the specified entry will be written.
2419 /*! \brief Retrieves the directory vnode and the leaf name of an entry referred
2441 the leaf name of the specified entry will be written.
2468 /*! Returns a vnode's name in the d_name field of a supplied dirent buffer.
2486 // The FS supports getting the name of a vnode.
2492 // The FS doesn't support getting the name of a vnode. So we search the
2530 get_vnode_name(struct vnode* vnode, struct vnode* parent, char* name,
2541 if (strlcpy(name, dirent->d_name, nameSize) >= nameSize)
2549 It uses the fs_get_vnode_name() call to get the name of a vnode; if a
2551 through the parent directory to get the name of the child.
2613 // get the node's name
2616 char* name = &((struct dirent*)nameBuffer)->d_name[0];
2636 // add the name in front of the current path
2637 name[B_FILE_NAME_LENGTH - 1] = '\0';
2638 length = strlen(name);
2644 memcpy(path + insert, name, length);
2886 // get dir vnode + leaf name
2921 // append the leaf name
3036 const char* name)
3039 size_t nameLength = strlen(name);
3048 memcpy(buffer + bufferSize, name, nameLength);
3099 // resolve the name
3101 const char* name = vnode->mount->entry_cache.DebugReverseLookup(
3103 if (name == NULL) {
3104 // Failed to resolve the name -- prepend "<dev,node>/".
3110 // prepend the name
3111 if (!debug_prepend_vnode_name_to_path(buffer, bufferSize, name)) {
4087 entry_cache_add(dev_t mountID, ino_t dirID, const char* name, ino_t nodeID)
4097 return mount->entry_cache.Add(dirID, name, nodeID, false);
4102 entry_cache_add_missing(dev_t mountID, ino_t dirID, const char* name)
4112 return mount->entry_cache.Add(dirID, name, -1, true);
4117 entry_cache_remove(dev_t mountID, ino_t dirID, const char* name)
4127 return mount->entry_cache.Remove(dirID, name);
4217 const char* name, struct vnode** _vnode)
4220 status_t status = entry_ref_to_vnode(mountID, directoryID, name, false, true, vnode);
4520 // We've got a path. Get the dir vnode and the leaf name.
4529 // get the dir vnode and the leaf name
4813 vfs_get_vnode_name(struct vnode* vnode, char* name, size_t nameSize)
4815 return get_vnode_name(vnode, NULL, name, nameSize, true);
4851 // append the leaf name
5293 panic("vfs_init: error creating path name object_cache\n");
5378 create_vnode(struct vnode* directory, const char* name, int openMode,
5404 status = lookup_dir_entry(directory, name, &entry);
5415 if (strlcpy(clonedName, name, B_FILE_NAME_LENGTH)
5431 name = clonedName;
5456 status = FS_CALL(directory, create, name, openMode | O_EXCL, perms,
5492 FS_CALL(directory, unlink, name);
5553 file_create_entry_ref(dev_t mountID, ino_t directoryID, const char* name,
5556 FUNCTION(("file_create_entry_ref: name = '%s', omode %x, perms %d, "
5557 "kernel %d\n", name, openMode, perms, kernel));
5565 status = create_vnode(directory, name, openMode, perms, kernel);
5579 char name[B_FILE_NAME_LENGTH];
5581 status_t status = fd_and_path_to_dir_vnode(fd, path, directory, name,
5586 return create_vnode(directory.Get(), name, openMode, perms, kernel);
5591 file_open_entry_ref(dev_t mountID, ino_t directoryID, const char* name,
5594 if (name == NULL || *name == '\0')
5598 "openMode = %d)\n", mountID, directoryID, name, openMode));
5604 status_t status = entry_ref_to_vnode(mountID, directoryID, name, traverse,
5615 directoryID, vnode->id, name);
5873 dir_create_entry_ref(dev_t mountID, ino_t parentID, const char* name, int perms,
5879 if (name == NULL || *name == '\0')
5883 "name = '%s', perms = %d)\n", mountID, parentID, name, perms));
5890 status = FS_CALL(vnode, create_dir, name, perms);
5923 dir_open_entry_ref(dev_t mountID, ino_t parentID, const char* name, bool kernel)
5927 if (name && name[0] == '\0')
5933 if (name) {
5934 status = entry_ref_to_vnode(mountID, parentID, name, true, kernel,
5947 vnode->id, name);
6096 char name[B_FILE_NAME_LENGTH];
6100 // we need to make sure our path name doesn't stop with "/", ".",
6116 // "name/" -> "name", or "name/." -> "name"
6125 status = fd_and_path_to_dir_vnode(fd, path, directory, name, kernel);
6130 status = FS_CALL(directory.Get(), remove_dir, name);
6459 char name[B_FILE_NAME_LENGTH];
6466 status = fd_and_path_to_dir_vnode(fd, path, vnode, name, kernel);
6471 status = FS_CALL(vnode.Get(), create_symlink, name, toPath, mode);
6490 char name[B_FILE_NAME_LENGTH];
6492 status_t status = fd_and_path_to_dir_vnode(pathFD, path, directory, name,
6507 status = FS_CALL(directory.Get(), link, name, vnode.Get());
6756 attr_create(int fd, char* path, const char* name, uint32 type,
6759 if (name == NULL || *name == '\0')
6776 status = FS_CALL(vnode.Get(), create_attr, name, type, openMode, &cookie);
6791 FS_CALL(vnode.Get(), remove_attr, name);
6798 attr_open(int fd, char* path, const char* name, int openMode, bool kernel)
6800 if (name == NULL || *name == '\0')
6817 status = FS_CALL(vnode.Get(), open_attr, name, openMode, &cookie);
6968 attr_remove(int fd, const char* name, bool kernel)
6970 if (name == NULL || *name == '\0')
6973 FUNCTION(("attr_remove: fd = %d, name = \"%s\", kernel %d\n", fd, name,
6983 status = FS_CALL(vnode, remove_attr, name);
6999 FUNCTION(("attr_rename: from fd = %d, from name = \"%s\", to fd = %d, to "
7000 "name = \"%s\", kernel %d\n", fromFD, fromName, toFD, toName, kernel));
7120 index_create(dev_t mountID, const char* name, uint32 type, uint32 flags,
7123 FUNCTION(("index_create(mountID = %" B_PRId32 ", name = %s, kernel = %d)\n",
7124 mountID, name, kernel));
7136 status = FS_MOUNT_CALL(mount, create_index, name, type, flags);
7174 index_name_read_stat(dev_t mountID, const char* name, struct stat* stat,
7177 FUNCTION(("index_remove(mountID = %" B_PRId32 ", name = %s, kernel = %d)\n",
7178 mountID, name, kernel));
7190 status = FS_MOUNT_CALL(mount, read_index_stat, name, stat);
7199 index_remove(dev_t mountID, const char* name, bool kernel)
7201 FUNCTION(("index_remove(mountID = %" B_PRId32 ", name = %s, kernel = %d)\n",
7202 mountID, name, kernel));
7214 status = FS_MOUNT_CALL(mount, remove_index, name);
7425 // if no FS name had been supplied, we get it from the partition
7429 TRACE(("fs_mount(): No FS name was given, and the DDM didn't "
7435 TRACE(("fs_mount(): No FS name was given, and the DDM found a "
7440 // The disk system name will not change, and the KDiskSystem
8266 _kern_open_entry_ref(dev_t device, ino_t inode, const char* name, int openMode,
8270 return file_create_entry_ref(device, inode, name, openMode, perms,
8274 return file_open_entry_ref(device, inode, name, openMode, true);
8308 The supplied name may be \c NULL, in which case directory identified
8311 and \a name its entry name.
8313 \param device If \a name is specified the ID of the device the parent
8316 \param inode If \a name is specified the node ID of the parent
8319 \param name The entry name of the directory to be opened. If \c NULL,
8325 _kern_open_dir_entry_ref(dev_t device, ino_t inode, const char* name)
8327 return dir_open_entry_ref(device, inode, name, true);
8391 _kern_create_dir_entry_ref(dev_t device, ino_t inode, const char* name,
8394 return dir_create_entry_ref(device, inode, name, perms, true);
8400 \a path must always be specified (it contains the name of the new directory
8466 \a path must always be specified (it contains the name of the new symlink
8506 \a path must always be specified (it contains at least the name of the entry
8532 the name of the entry). If only a path is given, this path identifies the
8693 _kern_open_attr(int fd, const char* path, const char* name, uint32 type,
8701 return attr_create(fd, pathBuffer.LockBuffer(), name, type, openMode,
8705 return attr_open(fd, pathBuffer.LockBuffer(), name, openMode, true);
8710 _kern_remove_attr(int fd, const char* name)
8712 return attr_remove(fd, name, true);
8732 _kern_create_index(dev_t device, const char* name, uint32 type, uint32 flags)
8734 return index_create(device, name, type, flags, true);
8739 _kern_read_index_stat(dev_t device, const char* name, struct stat* stat)
8741 return index_name_read_stat(device, name, stat, true);
8746 _kern_remove_index(dev_t device, const char* name)
8748 return index_remove(device, name, true);
8975 // copy the leaf name onto the stack
9043 char name[B_FILE_NAME_LENGTH];
9049 status_t status = user_copy_name(name, userName, sizeof(name));
9054 return file_create_entry_ref(device, inode, name, openMode, perms,
9058 return file_open_entry_ref(device, inode, name, openMode, false);
9088 char name[B_FILE_NAME_LENGTH];
9092 status_t status = user_copy_name(name, userName, sizeof(name));
9096 return dir_open_entry_ref(device, inode, name, false);
9124 /*! \brief Opens a directory's parent directory and returns the entry name
9127 Aside from that it returns the directory's entry name, this method is
9131 If a name buffer is supplied and the name does not fit the buffer, the
9135 \param userName Buffer the directory's entry name shall be written into.
9137 \param nameLength Size of the name buffer.
9164 // get the vnode name
9172 // copy the name to the userland buffer
9279 char name[B_FILE_NAME_LENGTH];
9285 status = user_copy_name(name, userName, sizeof(name));
9289 return dir_create_entry_ref(device, inode, name, perms, false);
9822 char name[B_FILE_NAME_LENGTH];
9826 status_t status = user_copy_name(name, userName, B_FILE_NAME_LENGTH);
9845 return attr_create(fd, userPath ? path : NULL, name, type, openMode,
9849 return attr_open(fd, userPath ? path : NULL, name, openMode, false);
9856 char name[B_FILE_NAME_LENGTH];
9860 status_t status = user_copy_name(name, userName, B_FILE_NAME_LENGTH);
9864 return attr_remove(fd, name, false);
9906 char name[B_FILE_NAME_LENGTH];
9910 status_t status = user_copy_name(name, userName, B_FILE_NAME_LENGTH);
9914 return index_create(device, name, type, flags, false);
9921 char name[B_FILE_NAME_LENGTH];
9927 status = user_copy_name(name, userName, B_FILE_NAME_LENGTH);
9931 status = index_name_read_stat(device, name, &stat, false);
9944 char name[B_FILE_NAME_LENGTH];
9948 status_t status = user_copy_name(name, userName, B_FILE_NAME_LENGTH);
9952 return index_remove(device, name, false);