From 3bb10b93235d69aeca99f47da9b1722cec44c36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 28 Jan 2004 23:07:52 +0000 Subject: [PATCH] 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 --- src/add-ons/kernel/file_systems/bfs/Volume.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Volume.cpp b/src/add-ons/kernel/file_systems/bfs/Volume.cpp index a0990fa89d..51983b6eed 100644 --- a/src/add-ons/kernel/file_systems/bfs/Volume.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Volume.cpp @@ -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();