]> git.proxmox.com Git - zfs-grub.git/blame - pvepatches/biosdisk.c-Check-disk-size-sanity.patch
use latest packages from githup (2.02-beta2.9-ZOL11-7aa9f6)
[zfs-grub.git] / pvepatches / biosdisk.c-Check-disk-size-sanity.patch
CommitLineData
0a671b56
DM
1From 4200ad44fe782193a397bd0f0ab72283a6d25e89 Mon Sep 17 00:00:00 2001
2From: Vladimir Serbinenko <phcoder@gmail.com>
3Date: Tue, 20 Jan 2015 14:10:34 +0000
4Subject: * grub-core/disk/i386/pc/biosdisk.c: Check disk size sanity.
5
6---
7diff --git a/grub-core/disk/i386/pc/biosdisk.c b/grub-core/disk/i386/pc/biosdisk.c
8index 6b21525..26a4973 100644
9--- a/grub-core/disk/i386/pc/biosdisk.c
10+++ b/grub-core/disk/i386/pc/biosdisk.c
11@@ -419,6 +419,11 @@ grub_biosdisk_open (const char *name, grub_disk_t disk)
12 }
13 }
14
15+ if (data->sectors == 0)
16+ data->sectors = 63;
17+ if (data->heads == 0)
18+ data->heads = 255;
19+
20 if (! total_sectors)
21 total_sectors = data->cylinders * data->heads * data->sectors;
22 }
23--
24cgit v0.9.0.2