8c6b1ac71e
Also include some minor fixes for gcc 5.1.1 Signed-off-by: Peter Jones <pjones@redhat.com>
42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
From 33f6ce671f984465e0f8f9c96927c087b6d0c1a1 Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Serbinenko <phcoder@gmail.com>
|
|
Date: Sun, 10 Aug 2014 09:50:36 +0200
|
|
Subject: [PATCH 089/506] * grub-core/fs/cbfs.c: Don't probe disks of
|
|
unknow size.
|
|
|
|
Fixes hang on virtualbox.
|
|
---
|
|
ChangeLog | 4 ++++
|
|
grub-core/fs/cbfs.c | 3 +++
|
|
2 files changed, 7 insertions(+)
|
|
|
|
diff --git a/ChangeLog b/ChangeLog
|
|
index ccd8ac1..47ff355 100644
|
|
--- a/ChangeLog
|
|
+++ b/ChangeLog
|
|
@@ -1,3 +1,7 @@
|
|
+2014-08-10 Vladimir Serbinenko <phcoder@gmail.com>
|
|
+
|
|
+ * grub-core/fs/cbfs.c: Don't probe disks of unknow size.
|
|
+
|
|
2014-07-08 Colin Watson <cjwatson@ubuntu.com>
|
|
|
|
* util/grub.d/10_hurd.in: Make kernel list progression not fail on
|
|
diff --git a/grub-core/fs/cbfs.c b/grub-core/fs/cbfs.c
|
|
index 7ad1483..35750a0 100644
|
|
--- a/grub-core/fs/cbfs.c
|
|
+++ b/grub-core/fs/cbfs.c
|
|
@@ -149,6 +149,9 @@ grub_cbfs_mount (grub_disk_t disk)
|
|
grub_off_t header_off;
|
|
struct cbfs_header head;
|
|
|
|
+ if (grub_disk_get_size (disk) == GRUB_DISK_SIZE_UNKNOWN)
|
|
+ goto fail;
|
|
+
|
|
if (grub_disk_read (disk, grub_disk_get_size (disk) - 1,
|
|
GRUB_DISK_SECTOR_SIZE - sizeof (ptr),
|
|
sizeof (ptr), &ptr))
|
|
--
|
|
2.4.3
|
|
|