The standard indices are now created when a volume is initialized.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6398 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -600,10 +600,20 @@ Volume::Initialize(const char *device, const char *name, uint32 blockSize, uint3
|
||||
fSuperBlock.root_dir = ToBlockRun(id);
|
||||
|
||||
if ((flags & VOLUME_NO_INDICES) == 0) {
|
||||
if ((status = CreateIndicesRoot(&transaction)) < B_OK)
|
||||
// The indices root directory will be created automatically
|
||||
// when the standard indices are created (or any other).
|
||||
Index index(this);
|
||||
status = index.Create(&transaction, "name", B_STRING_TYPE);
|
||||
if (status < B_OK)
|
||||
return status;
|
||||
|
||||
// ToDo: add "name", "last_modified", and "size" indices
|
||||
status = index.Create(&transaction, "last_modified", B_INT64_TYPE);
|
||||
if (status < B_OK)
|
||||
return status;
|
||||
|
||||
status = index.Create(&transaction, "size", B_INT64_TYPE);
|
||||
if (status < B_OK)
|
||||
return status;
|
||||
}
|
||||
|
||||
WriteSuperBlock();
|
||||
|
||||
Reference in New Issue
Block a user