Abide by the Coding Style Police.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43039 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
77697df4cf
commit
701c4b84bb
@ -6,12 +6,12 @@
|
|||||||
//! super block, mounting, etc.
|
//! super block, mounting, etc.
|
||||||
|
|
||||||
|
|
||||||
#include "Debug.h"
|
|
||||||
#include "Volume.h"
|
|
||||||
#include "Journal.h"
|
|
||||||
#include "Inode.h"
|
|
||||||
#include "Attribute.h"
|
#include "Attribute.h"
|
||||||
|
#include "Debug.h"
|
||||||
|
#include "Inode.h"
|
||||||
|
#include "Journal.h"
|
||||||
#include "Query.h"
|
#include "Query.h"
|
||||||
|
#include "Volume.h"
|
||||||
|
|
||||||
|
|
||||||
static const int32 kDesiredAllocationGroups = 56;
|
static const int32 kDesiredAllocationGroups = 56;
|
||||||
@ -412,14 +412,11 @@ Volume::Mount(const char* deviceName, uint32 flags)
|
|||||||
} else {
|
} else {
|
||||||
// we don't use the vnode layer to access the indices node
|
// we don't use the vnode layer to access the indices node
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
} else
|
|
||||||
{
|
|
||||||
FATAL(("could not create root node: publish_vnode() failed!\n"));
|
FATAL(("could not create root node: publish_vnode() failed!\n"));
|
||||||
delete fRootNode;
|
delete fRootNode;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
status = B_BAD_VALUE;
|
status = B_BAD_VALUE;
|
||||||
FATAL(("could not create root node!\n"));
|
FATAL(("could not create root node!\n"));
|
||||||
@ -428,7 +425,7 @@ Volume::Mount(const char* deviceName, uint32 flags)
|
|||||||
|
|
||||||
if (!(fFlags & VOLUME_READ_ONLY)) {
|
if (!(fFlags & VOLUME_READ_ONLY)) {
|
||||||
Attribute attr(fRootNode);
|
Attribute attr(fRootNode);
|
||||||
if (attr.Get ("be:volume_id") == B_ENTRY_NOT_FOUND)
|
if (attr.Get("be:volume_id") == B_ENTRY_NOT_FOUND)
|
||||||
CreateVolumeID();
|
CreateVolumeID();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -526,11 +523,11 @@ Volume::CreateVolumeID()
|
|||||||
seeded = true;
|
seeded = true;
|
||||||
}
|
}
|
||||||
uint64_t id;
|
uint64_t id;
|
||||||
size_t len = sizeof (id);
|
size_t length = sizeof(id);
|
||||||
id = ((uint64_t) rand () << 32) | rand ();
|
id = ((uint64_t)rand() << 32) | rand();
|
||||||
Transaction transaction(this, fRootNode->BlockNumber());
|
Transaction transaction(this, fRootNode->BlockNumber());
|
||||||
fRootNode->WriteLockInTransaction(transaction);
|
fRootNode->WriteLockInTransaction(transaction);
|
||||||
attr.Write(transaction, cookie, 0, (uint8_t *) &id, &len, NULL);
|
attr.Write(transaction, cookie, 0, (uint8_t *)&id, &length, NULL);
|
||||||
transaction.Done();
|
transaction.Done();
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
Reference in New Issue
Block a user