Lines Matching refs:path

111 	// The absolute maximum path length (for getcwd() - this is not depending
130 and thus making the access path vnode->mount->root_vnode->covers->mount->...
329 static status_t common_path_read_stat(int fd, char* path, bool traverseLeafLink,
332 static status_t vnode_path_to_vnode(struct vnode* vnode, char* path,
337 static status_t fd_and_path_to_vnode(int fd, char* path, bool traverseLeafLink,
343 static status_t fs_unmount(char* path, dev_t mountID, uint32 flags,
1987 /*! \brief Gets the directory path and leaf name for a given path.
1989 The supplied \a path is transformed to refer to the directory part of
1990 the entry identified by the original path, and into the buffer \a filename
1992 Neither the returned path nor the leaf name can be expected to be
1995 \param path The path to be analyzed. Must be able to store at least one
2001 if the given path name is empty.
2004 get_dir_path_and_leaf(char* path, char* filename)
2006 if (*path == '\0')
2009 char* last = strrchr(path, '/');
2012 FUNCTION(("get_dir_path_and_leaf(path = %s)\n", path));
2015 // this path is single segment with no '/' in it
2017 if (strlcpy(filename, path, B_FILE_NAME_LENGTH) >= B_FILE_NAME_LENGTH)
2020 strcpy(path, ".");
2024 // special case: the path ends in one or more '/' - remove them
2025 while (*--last == '/' && last != path);
2028 if (last == path && last[0] == '/') {
2029 // This path points to the root of the file system
2033 for (; last != path && *(last - 1) != '/'; last--);
2037 // normal leaf: replace the leaf portion of the path with a '.'
2104 /*! Returns the vnode for the relative path starting at the specified \a vnode.
2105 \a path must not be NULL.
2106 If it returns successfully, \a path contains the name of the last path
2107 component. This function clobbers the buffer pointed to by \a path only
2113 vnode_path_to_vnode(struct vnode* vnode, char* path, bool traverseLeafLink,
2120 FUNCTION(("vnode_path_to_vnode(vnode = %p, path = %s)\n", vnode, path));
2122 if (path == NULL) {
2127 if (*path == '\0') {
2136 TRACE(("vnode_path_to_vnode: top of loop. p = %p, p = '%s'\n", path,
2137 path));
2140 if (path[0] == '\0')
2143 // walk to find the next path component ("path" will point to a single
2144 // path component), and filter out multiple slashes
2145 for (nextPath = path + 1; *nextPath != '\0' && *nextPath != '/';
2156 // vnode so we pass the '..' path to the underlying filesystem.
2158 if (strcmp("..", path) == 0) {
2161 path = nextPath;
2182 // Tell the filesystem to get the vnode of this path component (if we
2185 status = lookup_dir_entry(vnode, path, &nextVnode);
2237 path = buffer;
2239 if (path[0] == '/') {
2243 while (*++path == '/')
2258 if (absoluteSymlink && *path == '\0') {
2262 status = vnode_path_to_vnode(vnode, path, true, count + 1,
2278 path = nextPath;
2297 vnode_path_to_vnode(struct vnode* vnode, char* path, bool traverseLeafLink,
2300 return vnode_path_to_vnode(vnode, path, traverseLeafLink, count,
2306 path_to_vnode(char* path, bool traverseLink, struct vnode** _vnode,
2311 FUNCTION(("path_to_vnode(path = \"%s\")\n", path));
2313 if (!path)
2316 if (*path == '\0')
2320 if (*path == '/') {
2326 while (*++path == '/')
2330 if (*path == '\0') {
2348 return vnode_path_to_vnode(start, path, traverseLink, 0, kernel, _vnode,
2353 /*! Returns the vnode in the next to last segment of the path, and returns
2355 The path buffer must be able to store at least one additional character.
2358 path_to_dir_vnode(char* path, struct vnode** _vnode, char* filename,
2361 status_t status = get_dir_path_and_leaf(path, filename);
2365 return path_to_vnode(path, true, _vnode, NULL, kernel);
2370 to by a FD + path pair.
2372 \a path must be given in either case. \a fd might be omitted, in which
2373 case \a path is either an absolute path or one relative to the current
2374 directory. If both a supplied and \a path is relative it is reckoned off
2375 of the directory referred to by \a fd. If \a path is absolute \a fd is
2382 \param path The absolute or relative path. Must not be \c NULL. The buffer
2384 string one character longer than the path it contains.
2394 fd_and_path_to_dir_vnode(int fd, char* path, struct vnode** _vnode,
2397 if (!path)
2399 if (*path == '\0')
2402 return path_to_dir_vnode(path, _vnode, filename, kernel);
2404 status_t status = get_dir_path_and_leaf(path, filename);
2408 return fd_and_path_to_vnode(fd, path, true, _vnode, NULL, kernel);
2413 to by a vnode + path pair.
2415 \a path must be given in either case. \a vnode might be omitted, in which
2416 case \a path is either an absolute path or one relative to the current
2417 directory. If both a supplied and \a path is relative it is reckoned off
2418 of the directory referred to by \a vnode. If \a path is absolute \a vnode is
2425 \param path The absolute or relative path. Must not be \c NULL. The buffer
2427 string one character longer than the path it contains.
2437 vnode_and_path_to_dir_vnode(struct vnode* vnode, char* path,
2440 if (!path)
2442 if (*path == '\0')
2444 if (vnode == NULL || path[0] == '/')
2445 return path_to_dir_vnode(path, _vnode, filename, kernel);
2447 status_t status = get_dir_path_and_leaf(path, filename);
2454 return vnode_path_to_vnode(vnode, path, true, 0, kernel, _vnode, NULL);
2538 /*! Gets the full path to a given directory vnode.
2546 Note that the path may not be correct the time this function returns!
2547 It doesn't use any locking to prevent returning the correct path, as
2548 paths aren't safe anyway: the path to a file can change at any time.
2550 It might be a good idea, though, to check if the returned path exists
2565 char* path = buffer;
2585 path[--insert] = '\0';
2586 // the path is filled right to left
2629 // path
2642 // add the name in front of the current path
2650 memcpy(path + insert, name, length);
2651 path[--insert] = '/';
2654 // the root dir will result in an empty path: fix it
2655 if (path[insert] == '\0')
2656 path[--insert] = '/';
2658 TRACE((" path is: %s\n", path + insert));
2660 // move the path to the start of the buffer
2662 memmove(buffer, path + insert, length);
2670 /*! Checks the length of every path component, and adds a '.'
2671 if the path ends in a slash.
2672 The given path buffer must be able to store at least one
2680 // check length of every path component
2698 // complete path if there is a slash at the end
2753 /*! Gets the vnode from an FD + path combination. If \a fd is lower than zero,
2754 only the path will be considered. In this case, the \a path must not be
2756 If \a fd is a valid file descriptor, \a path may be NULL for directories,
2760 fd_and_path_to_vnode(int fd, char* path, bool traverseLeafLink,
2763 if (fd < 0 && !path)
2766 if (path != NULL && *path == '\0')
2769 if (fd < 0 || (path != NULL && path[0] == '/')) {
2770 // no FD or absolute path
2771 return path_to_vnode(path, traverseLeafLink, _vnode, _parentID, kernel);
2774 // FD only, or FD + relative path
2779 if (path != NULL) {
2780 return vnode_path_to_vnode(vnode, path, traverseLeafLink, 0, kernel,
2784 // there is no relative path to take into account
2862 /*! In-place normalizes \a path. It's otherwise semantically equivalent to
2866 normalize_path(char* path, size_t pathSize, bool traverseLink, bool kernel)
2876 error = vnode_and_path_to_dir_vnode(dir, path, &nextDir, leaf, kernel);
2881 strcpy(path, leaf);
2890 if (vnode_path_to_vnode(dir, path, false, 0, kernel, &fileVnode,
2898 // we're done -- construct the path
2912 // get the directory path
2913 error = dir_vnode_to_path(dir, path, B_PATH_NAME_LENGTH, kernel);
2921 if ((strcmp(path, "/") != 0
2922 && strlcat(path, "/", pathSize) >= pathSize)
2923 || strlcat(path, leaf, pathSize) >= pathSize) {
2934 error = FS_CALL(fileVnode, read_symlink, path, &bufferSize);
2937 path[bufferSize] = '\0';
3053 // null-terminate the path
3120 char* path = debug_resolve_vnode_path(vnode, (char*)buffer,
3122 if (path != NULL) {
3123 kprintf(" path: ");
3126 kputs(path);
3129 kprintf("Failed to resolve vnode path.\n");
3133 kprintf("Failed to allocate memory for constructing the path.\n");
4051 vfs_get_vnode_from_path(const char* path, bool kernel, struct vnode** _vnode)
4053 TRACE(("vfs_get_vnode_from_path: entry. path = '%s', kernel %d\n",
4054 path, kernel));
4061 strlcpy(buffer, path, pathBuffer.BufferSize());
4147 vfs_get_fs_node_from_path(fs_volume* volume, const char* path,
4150 TRACE(("vfs_get_fs_node_from_path(volume = %p, path = \"%s\", kernel %d)\n",
4151 volume, path, kernel));
4163 strlcpy(buffer, path, pathBuffer.BufferSize());
4196 vfs_read_stat(int fd, const char* path, bool traverseLeafLink,
4201 if (path) {
4202 // path given: get the stat of the node referred to by (fd, path)
4203 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
4210 // no path given: get the FD and use the FD operation
4228 /*! Finds the full path to the file that contains the module \a moduleName,
4244 char* path;
4254 // the path buffer had been clobbered by the above call
4259 path = pathBuffer + length;
4276 memcpy(path, moduleName, length);
4277 path[length] = '\0';
4280 status = vnode_path_to_vnode(dir, path, true, 0, true, &file, NULL);
4288 path[length] = '/';
4289 path[length + 1] = '\0';
4290 path += length + 1;
4318 /*! \brief Normalizes a given path.
4320 The path must refer to an existing or non-existing entry in an existing
4321 directory, that is chopping off the leaf component the remaining path must
4329 normalized path (well, that is pretty much the definition of `normalized',
4332 \param path The path to be normalized.
4333 \param buffer The buffer into which the normalized path will be written.
4334 May be the same one as \a path.
4339 if the path is relative (to get the CWD).
4343 vfs_normalize_path(const char* path, char* buffer, size_t bufferSize,
4346 if (!path || !buffer || bufferSize < 1)
4349 if (path != buffer) {
4350 if (strlcpy(buffer, path, bufferSize) >= bufferSize)
4363 \param path The path where to create the entry for the node. Can be \c NULL,
4373 \a path is not \c NULL and not absolute).
4382 vfs_create_special_node(const char* path, fs_vnode* subVnode, mode_t mode,
4390 if (path) {
4391 // We've got a path. Get the dir vnode and the leaf name.
4397 if (strlcpy(tmpPath, path, B_PATH_NAME_LENGTH) >= B_PATH_NAME_LENGTH)
4406 // No path. Create the node in the root FS.
4674 char* path, size_t pathLength)
4694 // get the directory path
4695 status = dir_vnode_to_path(vnode, path, pathLength, true);
4704 if ((strcmp(path, "/") && strlcat(path, "/", pathLength)
4706 || strlcat(path, leaf, pathLength) >= pathLength) {
5146 "<devID>, <vnodeID> pair. If \"-p\" is given, a path of the vnode is\n"
5148 "complete path, though.\n",
5381 file_create(int fd, char* path, int openMode, int perms, bool kernel)
5383 FUNCTION(("file_create: path '%s', omode %x, perms %d, kernel %d\n", path,
5389 status_t status = fd_and_path_to_dir_vnode(fd, path, &directory, name,
5438 file_open(int fd, char* path, int openMode, bool kernel)
5442 FUNCTION(("file_open: fd: %d, entry path = '%s', omode %d, kernel %d\n",
5443 fd, path, openMode, kernel));
5445 // get the vnode matching the vnode + path combination
5448 status_t status = fd_and_path_to_vnode(fd, path, traverse, &vnode,
5654 dir_create(int fd, char* path, int perms, bool kernel)
5660 FUNCTION(("dir_create: path '%s', perms %d, kernel %d\n", path, perms,
5663 status = fd_and_path_to_dir_vnode(fd, path, &vnode, filename, kernel);
5709 dir_open(int fd, char* path, bool kernel)
5711 FUNCTION(("dir_open: fd: %d, entry path = '%s', kernel %d\n", fd, path,
5714 // get the vnode matching the vnode + path combination
5717 status_t status = fd_and_path_to_vnode(fd, path, true, &vnode, &parentID,
5861 dir_remove(int fd, char* path, bool kernel)
5867 if (path != NULL) {
5868 // we need to make sure our path name doesn't stop with "/", ".",
5871 while ((lastSlash = strrchr(path, '/')) != NULL) {
5877 while (lastSlash > path && lastSlash[-1] == '/')
5888 if (!strcmp(path, ".") || !strcmp(path, ".."))
5892 status = fd_and_path_to_dir_vnode(fd, path, &directory, name, kernel);
6133 common_read_link(int fd, char* path, char* buffer, size_t* _bufferSize,
6139 status = fd_and_path_to_vnode(fd, path, false, &vnode, NULL, kernel);
6154 common_create_symlink(int fd, char* path, const char* toPath, int mode,
6157 // path validity checks have to be in the calling function!
6162 FUNCTION(("common_create_symlink(fd = %d, path = %s, toPath = %s, "
6163 "mode = %d, kernel = %d)\n", fd, path, toPath, mode, kernel));
6165 status = fd_and_path_to_dir_vnode(fd, path, &vnode, name, kernel);
6183 common_create_link(int pathFD, char* path, int toFD, char* toPath,
6186 // path validity checks have to be in the calling function!
6188 FUNCTION(("common_create_link(path = %s, toPath = %s, kernel = %d)\n", path,
6193 status_t status = fd_and_path_to_dir_vnode(pathFD, path, &directory, name,
6224 common_unlink(int fd, char* path, bool kernel)
6230 FUNCTION(("common_unlink: fd: %d, path '%s', kernel %d\n", fd, path,
6233 status = fd_and_path_to_dir_vnode(fd, path, &vnode, filename, kernel);
6249 common_access(int fd, char* path, int mode, bool effectiveUserGroup, bool kernel)
6256 status = fd_and_path_to_vnode(fd, path, true, &vnode, NULL, kernel);
6272 common_rename(int fd, char* path, int newFD, char* newPath, bool kernel)
6280 FUNCTION(("common_rename(fd = %d, path = %s, newFD = %d, newPath = %s, "
6281 "kernel = %d)\n", fd, path, newFD, newPath, kernel));
6283 status = fd_and_path_to_dir_vnode(fd, path, &fromVnode, fromName, kernel);
6361 common_path_read_stat(int fd, char* path, bool traverseLeafLink,
6364 FUNCTION(("common_path_read_stat: fd: %d, path '%s', stat %p,\n", fd, path,
6368 status_t status = fd_and_path_to_vnode(fd, path, traverseLeafLink, &vnode,
6388 common_path_write_stat(int fd, char* path, bool traverseLeafLink,
6391 FUNCTION(("common_write_stat: fd: %d, path '%s', stat %p, stat_mask %d, "
6392 "kernel %d\n", fd, path, stat, statMask, kernel));
6395 status_t status = fd_and_path_to_vnode(fd, path, traverseLeafLink, &vnode,
6412 attr_dir_open(int fd, char* path, bool traverseLeafLink, bool kernel)
6414 FUNCTION(("attr_dir_open(fd = %d, path = '%s', kernel = %d)\n", fd, path,
6418 status_t status = fd_and_path_to_vnode(fd, path, traverseLeafLink, &vnode,
6488 attr_create(int fd, char* path, const char* name, uint32 type,
6496 status_t status = fd_and_path_to_vnode(fd, path, traverse, &vnode, NULL,
6535 attr_open(int fd, char* path, const char* name, int openMode, bool kernel)
6542 status_t status = fd_and_path_to_vnode(fd, path, traverse, &vnode, NULL,
7081 fs_mount(char* path, const char* device, const char* fsName, uint32 flags,
7090 FUNCTION(("fs_mount: entry. path = '%s', fs_name = '%s'\n", path, fsName));
7092 // The path is always safe, we just have to make sure that fsName is
7125 // normalize the device path
7134 // an invalid path, or the path refers to an image file. We try
7135 // to let the DDM create a file device for the path.
7152 // correct path to file device
7286 if (strcmp(path, "/") != 0) {
7296 status = path_to_vnode(path, true, &coveredNode, NULL, kernel);
7406 fs_unmount(char* path, dev_t mountID, uint32 flags, bool kernel)
7411 FUNCTION(("fs_unmount(path '%s', dev %ld, kernel %d\n", path, mountID,
7415 if (path != NULL) {
7416 err = path_to_vnode(path, true, &pathVnode, NULL, kernel);
7426 mount = find_mount(path != NULL ? pathVnode->device : mountID);
7433 if (path != NULL) {
7840 set_cwd(int fd, char* path, bool kernel)
7847 FUNCTION(("set_cwd: path = \'%s\'\n", path));
7849 // Get vnode for passed path, and bail if it failed
7850 status = fd_and_path_to_vnode(fd, path, true, &vnode, NULL, kernel);
7885 _kern_mount(const char* path, const char* device, const char* fsName,
7888 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
7897 _kern_unmount(const char* path, uint32 flags)
7899 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8010 /*! \brief Opens a node specified by a FD + path pair.
8012 At least one of \a fd and \a path must be specified.
8014 FD. If only a path is given, this path is opened. If both are given and
8015 the path is absolute, \a fd is ignored; a relative path is reckoned off
8019 \param path The absolute or relative path. May be \c NULL.
8025 _kern_open(int fd, const char* path, int openMode, int perms)
8027 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8063 /*! \brief Opens a directory specified by a FD + path pair.
8065 At least one of \a fd and \a path must be specified.
8067 FD. If only a path is given, this path is opened. If both are given and
8068 the path is absolute, \a fd is ignored; a relative path is reckoned off
8072 \param path The absolute or relative path. May be \c NULL.
8077 _kern_open_dir(int fd, const char* path)
8079 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8123 /*! \brief Creates a directory specified by a FD + path pair.
8125 \a path must always be specified (it contains the name of the new directory
8126 at least). If only a path is given, this path identifies the location at
8127 which the directory shall be created. If both \a fd and \a path are given
8128 and the path is absolute, \a fd is ignored; a relative path is reckoned off
8132 \param path The absolute or relative path. Must not be \c NULL.
8138 _kern_create_dir(int fd, const char* path, int perms)
8140 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8149 _kern_remove_dir(int fd, const char* path)
8151 if (path) {
8152 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8163 /*! \brief Reads the contents of a symlink referred to by a FD + path pair.
8165 At least one of \a fd and \a path must be specified.
8167 identified by this FD. If only a path is given, this path identifies the
8168 symlink to be read. If both are given and the path is absolute, \a fd is
8169 ignored; a relative path is reckoned off of the directory (!) identified
8175 \param path The absolute or relative path. May be \c NULL.
8182 _kern_read_link(int fd, const char* path, char* buffer, size_t* _bufferSize)
8184 if (path) {
8185 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8197 /*! \brief Creates a symlink specified by a FD + path pair.
8199 \a path must always be specified (it contains the name of the new symlink
8200 at least). If only a path is given, this path identifies the location at
8201 which the symlink shall be created. If both \a fd and \a path are given and
8202 the path is absolute, \a fd is ignored; a relative path is reckoned off
8206 \param toPath The absolute or relative path. Must not be \c NULL.
8212 _kern_create_symlink(int fd, const char* path, const char* toPath, int mode)
8214 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8224 _kern_create_link(int pathFD, const char* path, int toFD, const char* toPath,
8227 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8237 /*! \brief Removes an entry specified by a FD + path pair from its directory.
8239 \a path must always be specified (it contains at least the name of the entry
8240 to be deleted). If only a path is given, this path identifies the entry
8241 directly. If both \a fd and \a path are given and the path is absolute,
8242 \a fd is ignored; a relative path is reckoned off of the directory (!)
8246 \param path The absolute or relative path. Must not be \c NULL.
8251 _kern_unlink(int fd, const char* path)
8253 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8261 /*! \brief Moves an entry specified by a FD + path pair to a an entry specified
8262 by another FD + path pair.
8265 the name of the entry). If only a path is given, this path identifies the
8266 entry directly. If both a FD and a path are given and the path is absolute,
8267 the FD is ignored; a relative path is reckoned off of the directory (!)
8271 \param oldPath The absolute or relative path of the old location. Must not
8274 \param newPath The absolute or relative path of the new location. Must not
8293 _kern_access(int fd, const char* path, int mode, bool effectiveUserGroup)
8295 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8304 /*! \brief Reads stat data of an entity specified by a FD + path pair.
8307 of the FD (node, attr, attr dir etc.) is performed. If only \a path is
8308 given, this path identifies the entry for whose node to retrieve the
8309 stat data. If both \a fd and \a path are given and the path is absolute,
8310 \a fd is ignored; a relative path is reckoned off of the directory (!)
8315 \param path The absolute or relative path. Must not be \c NULL.
8316 \param traverseLeafLink If \a path is given, \c true specifies that the
8324 _kern_read_stat(int fd, const char* path, bool traverseLeafLink,
8340 status = vfs_read_stat(fd, path, traverseLeafLink, stat, true);
8349 /*! \brief Writes stat data of an entity specified by a FD + path pair.
8352 of the FD (node, attr, attr dir etc.) is performed. If only \a path is
8353 given, this path identifies the entry for whose node to write the
8354 stat data. If both \a fd and \a path are given and the path is absolute,
8355 \a fd is ignored; a relative path is reckoned off of the directory (!)
8360 \param path The absolute or relative path. Must not be \c NULL.
8361 \param traverseLeafLink If \a path is given, \c true specifies that the
8371 _kern_write_stat(int fd, const char* path, bool traverseLeafLink,
8389 if (path) {
8390 // path given: write the stat of the node referred to by (fd, path)
8391 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8398 // no path given: get the FD and use the FD operation
8417 _kern_open_attr_dir(int fd, const char* path, bool traverseLeafLink)
8423 if (path != NULL)
8424 pathBuffer.SetTo(path);
8426 return attr_dir_open(fd, path ? pathBuffer.LockBuffer() : NULL,
8432 _kern_open_attr(int fd, const char* path, const char* name, uint32 type,
8435 KPath pathBuffer(path, false, B_PATH_NAME_LENGTH + 1);
8502 _kern_setcwd(int fd, const char* path)
8508 if (path != NULL)
8509 pathBuffer.SetTo(path);
8511 return set_cwd(fd, path != NULL ? pathBuffer.LockBuffer() : NULL, true);
8524 KPath path, device;
8533 if (path.InitCheck() != B_OK || device.InitCheck() != B_OK)
8536 if (user_strlcpy(path.LockBuffer(), userPath, B_PATH_NAME_LENGTH) < B_OK)
8562 path.UnlockBuffer();
8565 status = fs_mount(path.LockBuffer(),
8581 char* path = pathBuffer.LockBuffer();
8583 if (user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
8586 return fs_unmount(path, -1, flags & ~B_UNMOUNT_BUSY_PARTITION, false);
8695 KPath path(B_PATH_NAME_LENGTH + 1);
8696 if (path.InitCheck() != B_OK)
8715 path.LockBuffer(), path.BufferSize());
8719 path.UnlockBuffer();
8721 int length = user_strlcpy(userPath, path.Path(), pathLength);
8739 // copy path from userland
8743 char* path = pathBuffer.LockBuffer();
8745 if (user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
8748 status_t error = normalize_path(path, pathBuffer.BufferSize(), traverseLink,
8754 int len = user_strlcpy(buffer, path, B_PATH_NAME_LENGTH);
8788 KPath path(B_PATH_NAME_LENGTH + 1);
8789 if (path.InitCheck() != B_OK)
8792 char* buffer = path.LockBuffer();
8827 KPath path(B_PATH_NAME_LENGTH + 1);
8828 if (path.InitCheck() != B_OK)
8831 char* buffer = path.LockBuffer();
9007 char* path = pathBuffer.LockBuffer();
9010 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
9013 return dir_create(fd, path, perms, false);
9024 char* path = pathBuffer.LockBuffer();
9028 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
9032 return dir_remove(fd, userPath ? path : NULL, false);
9050 char* path = pathBuffer.LockBuffer();
9055 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
9062 status_t status = common_read_link(fd, userPath ? path : NULL, buffer,
9089 char* path = pathBuffer.LockBuffer();
9094 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK
9098 return common_create_symlink(fd, path, toPath, mode, false);
9111 char* path = pathBuffer.LockBuffer();
9116 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK
9124 return common_create_link(pathFD, path, toFD, toPath, traverseLeafLink,
9136 char* path = pathBuffer.LockBuffer();
9139 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
9142 return common_unlink(fd, path, false);
9174 char* path = pathBuffer.LockBuffer();
9177 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK) {
9181 // split into directory vnode and filename path
9184 status_t status = fd_and_path_to_dir_vnode(fd, path, &dir, filename, false);
9269 char* path = pathBuffer.LockBuffer();
9272 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
9275 return common_access(fd, path, mode, effectiveUserGroup, false);
9293 // path given: get the stat of the node referred to by (fd, path)
9301 char* path = pathBuffer.LockBuffer();
9303 ssize_t length = user_strlcpy(path, userPath, B_PATH_NAME_LENGTH);
9309 status = common_path_read_stat(fd, path, traverseLink, &stat, false);
9311 // no path given: get the FD and use the FD operation
9352 // path given: write the stat of the node referred to by (fd, path)
9360 char* path = pathBuffer.LockBuffer();
9362 ssize_t length = user_strlcpy(path, userPath, B_PATH_NAME_LENGTH);
9368 status = common_path_write_stat(fd, path, traverseLeafLink, &stat,
9371 // no path given: get the FD and use the FD operation
9397 char* path = pathBuffer.LockBuffer();
9401 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
9405 return attr_dir_open(fd, userPath ? path : NULL, traverseLeafLink, false);
9493 char* path = pathBuffer.LockBuffer();
9497 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
9502 return attr_create(fd, userPath ? path : NULL, name, type, openMode,
9506 return attr_open(fd, userPath ? path : NULL, name, openMode, false);
9620 char* path = pathBuffer.LockBuffer();
9622 status_t status = get_cwd(path, size, false);
9627 if (user_strlcpy(userBuffer, path, size) < B_OK)
9637 TRACE(("user_setcwd: path = %p\n", userPath));
9643 char* path = pathBuffer.LockBuffer();
9647 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
9651 return set_cwd(fd, userPath != NULL ? path : NULL, false);
9662 // alloc path buffer
9667 // copy userland path to kernel
9668 char* path = pathBuffer.LockBuffer();
9671 || user_strlcpy(path, userPath, B_PATH_NAME_LENGTH) < B_OK)
9677 status_t status = path_to_vnode(path, true, &vnode, NULL, false);