rem: return user_strlcpy(userPath, path, pathLength);
add: int len = user_strlcpy(userPath, path, pathLength); if (len < 0) return len; if (len >= (int)pathLength) return B_BUFFER_OVERFLOW; return B_OK;
context: _user_entry_ref_to_path(dev_t device, ino_t inode, const char *leaf,	char *userPath, size_t pathLength){	char path[B_PATH_NAME_LENGTH + 1];	struct vnode *vnode;	int status;	if (!IS_USER_ADDRESS(userPath))		return B_BAD_ADDRESS;	// copy the leaf name onto the stack	char stackLeaf[B_FILE_NAME_LENGTH];	if (leaf) {		if (!IS_USER_ADDRESS(leaf))			return B_BAD_ADDRESS;		status = user_strlcpy(stackLeaf, leaf, B_FILE_NAME_LENGTH);		if (status != B_OK)			return status;		leaf = stackLeaf;		// filter invalid leaf names		if (leaf[0] == '\0' || strchr(leaf, '/'))			return B_BAD_VALUE;	}	// get the vnode matching the dir's node_ref	if (leaf && (strcmp(leaf, ".") == 0 || strcmp(leaf, "..") == 0)) {		// special cases "." and "..": we can directly get the vnode of the		// referenced directory		status = entry_ref_to_vnode(device, inode, leaf, &vnode);		leaf = NULL;	} else		status = get_vnode(device, inode, &vnode, false);	if (status < B_OK)		return status;	// get the directory path	status = dir_vnode_to_path(vnode, path, sizeof(path));	put_vnode(vnode);		// we don't need the vnode anymore	if (status < B_OK)		return status;	// append the leaf name	if (leaf) {		if (strlcat(path, "/", sizeof(path)) >= sizeof(path)			|| strlcat(path, leaf, sizeof(path)) >= sizeof(path)) {			return B_NAME_TOO_LONG;		}	}	return user_strlcpy(userPath, path, pathLength);}