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:
Axel Dörfler
2004-01-28 23:07:52 +00:00
parent 0e1505b5f4
commit 3bb10b9323
+12 -2
View File
@@ -600,10 +600,20 @@ Volume::Initialize(const char *device, const char *name, uint32 blockSize, uint3
fSuperBlock.root_dir = ToBlockRun(id); fSuperBlock.root_dir = ToBlockRun(id);
if ((flags & VOLUME_NO_INDICES) == 0) { 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; 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(); WriteSuperBlock();