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:
Tyler Dauwalder 2003-09-09 06:21:25 +00:00
parent b4bfabded1
commit 6d14aa1a4b

View File

@ -8,7 +8,7 @@
// code :-P).
//---------------------------------------------------------------------
/*! \file vfs_interface.cpp
/*! \file udf.cpp
*/
#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
* geometry.cylinder_count * geometry.head_count;
} 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
if (!err) {