From 99806fe3d6a514eb82b12699e73abe25f55e3111 Mon Sep 17 00:00:00 2001 From: Fredrik Holmqvist Date: Mon, 22 Mar 2021 17:29:56 +0100 Subject: [PATCH] Anyboot CD detection, remove nr of partitions check When booting from floppy image (BOOT_VOLUME_BOOTED_FROM_IMAGE) we don't know the partition offset, and the number of partitions are different for 32 bit and 64 bit anyboot cds. So don't check for number of partitions. This should only happen when BOOT_VOLUME_BOOTED_FROM_IMAGE is set. Its intention is to signal if boot was from a floppy image, so most boot platforms should not set it. It seems they do, that probably needs a fix of its own. Change-Id: I6b60a997b72b9928555840358257e15ff417fd42 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3819 Reviewed-by: Adrien Destugues --- src/system/kernel/fs/vfs_boot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/system/kernel/fs/vfs_boot.cpp b/src/system/kernel/fs/vfs_boot.cpp index 68bf97c4fe..45e7fb785a 100644 --- a/src/system/kernel/fs/vfs_boot.cpp +++ b/src/system/kernel/fs/vfs_boot.cpp @@ -275,11 +275,11 @@ DiskBootMethod::IsBootPartition(KPartition* partition, bool& foundForSure) if (fMethod == BOOT_METHOD_CD) { // Check for the boot partition of an anyboot CD. We identify it as - // such, if it is the only primary partition on the CD, has type - // BFS, and the boot partition offset is 0. + // such if it is a partition on the CD, has type BFS, and the boot + // partition offset is 0 KDiskDevice* device = partition->Device(); - if (IsBootDevice(device, false) && bootPartitionOffset == 0 - && partition->Parent() == device && device->CountChildren() == 1 + if (IsBootDevice(device, false) + && bootPartitionOffset == 0 && partition->Parent() == device && device->ContentType() != NULL && strcmp(device->ContentType(), kPartitionTypeIntel) == 0 && partition->ContentType() != NULL