Fixed bug #483:
* vfs_get_fs_node_from_path() now also work for absolute paths again (but still for relative ones from the volume root) - it just tests if the mount IDs fit, so it only returns successful if the path really is on the desired mount. * the Disk Device Manager publish functions now call devfs_publish_*() correctly (by omitting the "/dev/" mount point). * devfs_publish_partition() now accepts absolute device paths but relative partition paths. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17138 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2107,9 +2107,11 @@ devfs_publish_partition(const char *path, const partition_info *info)
|
||||
// the partition and device paths must be the same until the leaves
|
||||
const char *lastPath = strrchr(path, '/');
|
||||
const char *lastDevice = strrchr(info->device, '/');
|
||||
if (lastPath == NULL || lastDevice == NULL
|
||||
|| lastPath - path != lastDevice - info->device
|
||||
|| strncmp(path, info->device, lastPath - path))
|
||||
if (lastPath == NULL || lastDevice == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
size_t length = lastDevice - (lastPath - path) - info->device;
|
||||
if (strncmp(path, info->device + length, lastPath - path))
|
||||
return B_BAD_VALUE;
|
||||
|
||||
devfs_vnode *device;
|
||||
|
||||
Reference in New Issue
Block a user