From 127b80eca206b8a11fcbada150c090944ec1acb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 3 Nov 2004 02:15:31 +0000 Subject: [PATCH] Fixed a bug when the wanna-be boot partition could not been mounted; the partition was deleted, but never removed from the partition list. No longer prints out the root directory contents of all file systems. Debug output now uses dprintf() rather than printf(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9747 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/loader/vfs.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/kernel/boot/loader/vfs.cpp b/src/kernel/boot/loader/vfs.cpp index 10e7d66a70..a12f677b06 100644 --- a/src/kernel/boot/loader/vfs.cpp +++ b/src/kernel/boot/loader/vfs.cpp @@ -1,6 +1,6 @@ /* ** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. -** Distributed under the terms of the OpenBeOS License. +** Distributed under the terms of the Haiku License. */ @@ -19,9 +19,9 @@ using namespace boot; -#define TRACE_VFS 0 -#if TRACE_VFS -# define TRACE(x) printf x +//#define TRACE_VFS +#ifdef TRACE_VFS +# define TRACE(x) dprintf x #else # define TRACE(x) ; #endif @@ -326,10 +326,11 @@ get_boot_file_system(stage2_args *args) Directory *fileSystem; status_t status = partition->Mount(&fileSystem); - + if (status < B_OK) { // this partition doesn't contain any known file system; we // don't need it anymore + gPartitions.Remove(partition); delete partition; return NULL; } @@ -393,6 +394,7 @@ mount_file_systems(stage2_args *args) if (gPartitions.IsEmpty()) return B_ENTRY_NOT_FOUND; +#if 0 void *cookie; if (gRoot->Open(&cookie, O_RDONLY) == B_OK) { Directory *directory; @@ -411,6 +413,8 @@ mount_file_systems(stage2_args *args) } gRoot->Close(cookie); } +#endif + return B_OK; }