When you try to mount a file image, BFS now only sees the normalized path instead
of the one supplied to fs_mount() (but not the /dev/disk/virtual/... entry, as that wouldn't be that clear to the user). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17335 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -5137,10 +5137,11 @@ fs_mount(char *path, const char *device, const char *fsName, uint32 flags,
|
|||||||
// get the partition
|
// get the partition
|
||||||
KDiskDeviceManager *ddm = KDiskDeviceManager::Default();
|
KDiskDeviceManager *ddm = KDiskDeviceManager::Default();
|
||||||
KPartition *partition = NULL;
|
KPartition *partition = NULL;
|
||||||
|
KPath normalizedDevice;
|
||||||
bool newlyCreatedFileDevice = false;
|
bool newlyCreatedFileDevice = false;
|
||||||
|
|
||||||
if (!(flags & B_MOUNT_VIRTUAL_DEVICE) && device) {
|
if (!(flags & B_MOUNT_VIRTUAL_DEVICE) && device) {
|
||||||
// normalize the device path
|
// normalize the device path
|
||||||
KPath normalizedDevice;
|
|
||||||
status = normalizedDevice.SetTo(device, true);
|
status = normalizedDevice.SetTo(device, true);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
@@ -5166,6 +5167,9 @@ fs_mount(char *path, const char *device, const char *fsName, uint32 flags,
|
|||||||
normalizedDevice.Path()));
|
normalizedDevice.Path()));
|
||||||
return B_ENTRY_NOT_FOUND;
|
return B_ENTRY_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
device = normalizedDevice.Path();
|
||||||
|
// correct path to file device
|
||||||
}
|
}
|
||||||
PartitionRegistrar partitionRegistrar(partition, true);
|
PartitionRegistrar partitionRegistrar(partition, true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user