rem: if (lstat(realPath.c_str(), &st) < 0)
add: if (stat(realPath.c_str(), &st) < 0)
context: _kern_open_parent_dir(int fd, char *name, size_t nameLength){	// get a usable path	string realPath;	status_t error = get_path(fd, name, realPath);	if (error != B_OK)		return error;	// stat the entry	struct stat st;	if (lstat(realPath.c_str(), &st) < 0)		return errno;	if (!S_ISDIR(st.st_mode))		return B_NOT_A_DIRECTORY;	// get the entry name	realPath += "/..";	string entryName;	error = find_dir_entry(realPath.c_str(), NodeRef(st),		entryName, false);	if (error != B_OK)		return error;	if (strlcpy(name, entryName.c_str(), nameLength) >= nameLength)		return B_BUFFER_OVERFLOW;	// open the parent directory					return open_dir(realPath.c_str());}