[haiku-commits] haiku: hrev46296 - src/system/kernel/fs

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 28 Oct 2013 01:18:40 +0100 (CET)

hrev46296 adds 1 changeset to branch 'master'
old head: 3fe3603adaec193c2ebdfb7161a32be3183036c5
new head: fdaba7aaa588f2808e66c439db0bb4ea8bebbf5e
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=fdaba7a+%5E3fe3603

----------------------------------------------------------------------------

fdaba7a: Skip boot device check sum test on CD boot
  
  Whatever we read from the drive in the boot loader isn't what we can
  read from the device later, so rather skip the check sum test for
  identifying the boot device in the kernel when booting off CD. Fixes
  #10147.

                                    [ Ingo Weinhold <ingo_weinhold@xxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev46296
Commit:      fdaba7aaa588f2808e66c439db0bb4ea8bebbf5e
URL:         http://cgit.haiku-os.org/haiku/commit/?id=fdaba7a
Author:      Ingo Weinhold <ingo_weinhold@xxxxxx>
Date:        Mon Oct 28 00:17:42 2013 UTC

Ticket:      https://dev.haiku-os.org/ticket/10147

----------------------------------------------------------------------------

1 file changed, 5 insertions(+)
src/system/kernel/fs/vfs_boot.cpp | 5 +++++

----------------------------------------------------------------------------

diff --git a/src/system/kernel/fs/vfs_boot.cpp 
b/src/system/kernel/fs/vfs_boot.cpp
index 5af49a6..ac0f899 100644
--- a/src/system/kernel/fs/vfs_boot.cpp
+++ b/src/system/kernel/fs/vfs_boot.cpp
@@ -222,6 +222,11 @@ DiskBootMethod::IsBootDevice(KDiskDevice* device, bool 
strict)
                        if (strict && device->Size() != 
disk->device.unknown.size)
                                return false;
 
+                       // Skip the check sum test for CDs, since we didn't 
read anything
+                       // useful from the disk in the boot loader.
+                       if (fMethod == BOOT_METHOD_CD)
+                               break;
+
                        // check if the check sums match, too
                        for (int32 i = 0; i < NUM_DISK_CHECK_SUMS; i++) {
                                if (disk->device.unknown.check_sums[i].offset 
== -1)


Other related posts:

  • » [haiku-commits] haiku: hrev46296 - src/system/kernel/fs - ingo_weinhold