Finished up udf_mount(), added udf_release_node()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3835 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -35,6 +35,7 @@ extern "C" {
|
|||||||
# define dprintf printf
|
# define dprintf printf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "Icb.h"
|
||||||
#include "Volume.h"
|
#include "Volume.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -238,7 +239,7 @@ udf_mount(nspace_id nsid, const char *deviceName, ulong flags, void *parms,
|
|||||||
|
|
||||||
status_t err = B_OK;
|
status_t err = B_OK;
|
||||||
off_t deviceSize = 0; // in blocks
|
off_t deviceSize = 0; // in blocks
|
||||||
UDF::Volume *volume = NULL;
|
Udf::Volume *volume = NULL;
|
||||||
device_geometry geometry;
|
device_geometry geometry;
|
||||||
|
|
||||||
// Open the device (read only should be fine), get its geometry,
|
// Open the device (read only should be fine), get its geometry,
|
||||||
@@ -256,7 +257,7 @@ udf_mount(nspace_id nsid, const char *deviceName, ulong flags, void *parms,
|
|||||||
|
|
||||||
// Create and mount the volume
|
// Create and mount the volume
|
||||||
if (!err) {
|
if (!err) {
|
||||||
volume = new UDF::Volume(nsid);
|
volume = new Udf::Volume(nsid);
|
||||||
err = volume ? B_OK : B_NO_MEMORY;
|
err = volume ? B_OK : B_NO_MEMORY;
|
||||||
}
|
}
|
||||||
if (!err) {
|
if (!err) {
|
||||||
@@ -265,11 +266,9 @@ udf_mount(nspace_id nsid, const char *deviceName, ulong flags, void *parms,
|
|||||||
|
|
||||||
if (!err) {
|
if (!err) {
|
||||||
if (rootID)
|
if (rootID)
|
||||||
*rootID = 0; // todo: get the real root id once it's implemented
|
*rootID = volume->RootIcb()->Id();
|
||||||
if (volumeCookie)
|
if (volumeCookie)
|
||||||
*volumeCookie = volume;
|
*volumeCookie = volume;
|
||||||
// todo: ditch this
|
|
||||||
dprintf("new_vnode(root) = %d\n", new_vnode(nsid, *rootID, (void*)23));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN(err);
|
RETURN(err);
|
||||||
@@ -280,7 +279,7 @@ int
|
|||||||
udf_unmount(void *ns)
|
udf_unmount(void *ns)
|
||||||
{
|
{
|
||||||
DEBUG_INIT(CF_ENTRY | CF_VOLUME_OPS, NULL);
|
DEBUG_INIT(CF_ENTRY | CF_VOLUME_OPS, NULL);
|
||||||
return B_OK;
|
RETURN(B_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -335,9 +334,11 @@ udf_read_vnode(void *ns, vnode_id id, char reenter, void **node)
|
|||||||
int
|
int
|
||||||
udf_release_vnode(void *ns, void *node, char reenter)
|
udf_release_vnode(void *ns, void *node, char reenter)
|
||||||
{
|
{
|
||||||
DEBUG_INIT(CF_ENTRY | CF_VOLUME_OPS, NULL);
|
DEBUG_INIT_ETC(CF_ENTRY | CF_VOLUME_OPS, NULL, ("node = %p", node));
|
||||||
// FUNCTION_START(("node = %p\n",node));
|
|
||||||
return B_ERROR;
|
Udf::Icb *icb = reinterpret_cast<Udf::Icb*>(node);
|
||||||
|
delete icb;
|
||||||
|
RETURN(B_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user