Fixed bug that disallowed mounting a UDF volume in a regular file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4601 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
// code :-P).
|
// code :-P).
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
/*! \file vfs_interface.cpp
|
/*! \file udf.cpp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "UdfDebug.h"
|
#include "UdfDebug.h"
|
||||||
@@ -254,9 +254,15 @@ udf_mount(nspace_id nsid, const char *deviceName, ulong flags, void *parms,
|
|||||||
deviceSize = (off_t)geometry.sectors_per_track
|
deviceSize = (off_t)geometry.sectors_per_track
|
||||||
* geometry.cylinder_count * geometry.head_count;
|
* geometry.cylinder_count * geometry.head_count;
|
||||||
} else {
|
} else {
|
||||||
err = errno;
|
struct stat stat;
|
||||||
|
err = fstat(device, &stat) < 0 ? B_ERROR : B_OK;
|
||||||
|
if (!err) {
|
||||||
|
deviceSize = stat.st_size / 2048;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Create and mount the volume
|
// Create and mount the volume
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user