From 50ef9ecfb6d77ce35e52a60f83f586c788798908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 15 Jun 2004 17:04:05 +0000 Subject: [PATCH] Now stores the module name of the modules handling the partition. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7994 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/loader/partitions.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/kernel/boot/loader/partitions.cpp b/src/kernel/boot/loader/partitions.cpp index acdf620521..e147d551aa 100644 --- a/src/kernel/boot/loader/partitions.cpp +++ b/src/kernel/boot/loader/partitions.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -17,8 +18,8 @@ using namespace boot; -#define TRACE_PARTITIONS 0 -#if TRACE_PARTITIONS +#define TRACE_PARTITIONS +#ifdef TRACE_PARTITIONS # define TRACE(x) printf x #else # define TRACE(x) ; @@ -27,7 +28,7 @@ using namespace boot; /* supported partition modules */ -static partition_module_info *sPartitionModules[] = { +static const partition_module_info *sPartitionModules[] = { #ifdef BOOT_SUPPORT_PARTITION_AMIGA &gAmigaPartitionModule, #endif @@ -183,10 +184,13 @@ Partition::Mount(Directory **_fileSystem) Directory *fileSystem; if (module->get_file_system(this, &fileSystem) == B_OK) { - gRoot->AddVolume(fileSystem); + gRoot->AddVolume(fileSystem, this); if (_fileSystem) *_fileSystem = fileSystem; + // remember the module name that mounted us + fModuleName = module->module_name; + fIsFileSystem = true; return B_OK; } @@ -204,7 +208,7 @@ Partition::Scan(bool mountFileSystems) TRACE(("Partition::Scan()\n")); for (int32 i = 0; i < sNumPartitionModules; i++) { - partition_module_info *module = sPartitionModules[i]; + const partition_module_info *module = sPartitionModules[i]; void *cookie; NodeOpener opener(this, O_RDONLY); @@ -241,6 +245,9 @@ Partition::Scan(bool mountFileSystems) while ((child = (Partition *)fChildren.RemoveHead()) != NULL) delete child; + // remember the module name that identified us + fModuleName = module->module.name; + return B_OK; } }