From acfef65c84b9eaf5b19d7f1720524cb5007d899b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 19 Apr 2004 21:57:50 +0000 Subject: [PATCH] Fixed a bug that would rescan the boot partition in mount_file_systems() in case it couldn't be used for booting (lack of a kernel or whatever). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7243 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/loader/vfs.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/kernel/boot/loader/vfs.cpp b/src/kernel/boot/loader/vfs.cpp index ab81cecd50..068b0ba98c 100644 --- a/src/kernel/boot/loader/vfs.cpp +++ b/src/kernel/boot/loader/vfs.cpp @@ -1,5 +1,5 @@ /* -** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. ** Distributed under the terms of the OpenBeOS License. */ @@ -317,11 +317,15 @@ get_boot_file_system(stage2_args *args) return NULL; Directory *fileSystem; - if (partition->Mount(&fileSystem) < B_OK) { + status_t status = partition->Mount(&fileSystem); + + gPartitions.Remove(partition); // let's remove that partition, so that it is not scanned again // in mount_file_systems() - gPartitions.Remove(partition); + if (status < B_OK) { + // this partition doesn't contain any known file system; we + // don't need it anymore delete partition; return NULL; }