diff options
author | V3n3RiX <venerix@rogentos.ro> | 2015-11-29 11:46:41 +0000 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2015-11-29 11:46:41 +0000 |
commit | 52953ad1ef6850a93ec433cfcd38810433e11a8a (patch) | |
tree | 5c96a8a77dc18378ffd651798ad4604194d560ad /sys-boot/grub/files/grub-1.97-hostdisk.patch | |
parent | f99e4460b0bd3b9372f57482547e287f12ba6418 (diff) |
drop our grub, use gentoo one
Diffstat (limited to 'sys-boot/grub/files/grub-1.97-hostdisk.patch')
-rw-r--r-- | sys-boot/grub/files/grub-1.97-hostdisk.patch | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/sys-boot/grub/files/grub-1.97-hostdisk.patch b/sys-boot/grub/files/grub-1.97-hostdisk.patch deleted file mode 100644 index 6eb7fe48..00000000 --- a/sys-boot/grub/files/grub-1.97-hostdisk.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- util/hostdisk.c 2010-01-25 17:04:22 +0000 -+++ util/hostdisk.c 2010-01-31 11:52:27 +0000 -@@ -336,7 +336,8 @@ - char dev[PATH_MAX]; - - strcpy (dev, map[disk->id].device); -- if (disk->partition && strncmp (map[disk->id].device, "/dev/", 5) == 0) -+ if (disk->partition && sector >= disk->partition->start -+ && strncmp (map[disk->id].device, "/dev/", 5) == 0) - is_partition = linux_find_partition (dev, disk->partition->start); - - /* Open the partition. */ -@@ -490,6 +491,23 @@ - { - int fd; - -+ /* Split pre-partition and partition reads. */ -+ if (disk->partition && sector < disk->partition->start -+ && sector + size > disk->partition->start) -+ { -+ grub_err_t err; -+ err = grub_util_biosdisk_read (disk, sector, -+ disk->partition->start - sector, -+ buf); -+ if (err) -+ return err; -+ -+ return grub_util_biosdisk_read (disk, disk->partition->start, -+ size - (disk->partition->start - sector), -+ buf + ((disk->partition->start - sector) -+ << GRUB_DISK_SECTOR_BITS)); -+ } -+ - fd = open_device (disk, sector, O_RDONLY); - if (fd < 0) - return grub_errno; -@@ -527,6 +545,23 @@ - { - int fd; - -+ /* Split pre-partition and partition writes. */ -+ if (disk->partition && sector < disk->partition->start -+ && sector + size > disk->partition->start) -+ { -+ grub_err_t err; -+ err = grub_util_biosdisk_write (disk, sector, -+ disk->partition->start - sector, -+ buf); -+ if (err) -+ return err; -+ -+ return grub_util_biosdisk_write (disk, disk->partition->start, -+ size - (disk->partition->start - sector), -+ buf + ((disk->partition->start - sector) -+ << GRUB_DISK_SECTOR_BITS)); -+ } -+ - fd = open_device (disk, sector, O_WRONLY); - if (fd < 0) - return grub_errno; |