wok view grub4dos/stuff/dev_partition.diff @ rev 14730

Up xorg-xf86-video-ati (7.1.0), xorg-xf86-video-fbdev (0.4.3), xorg-xf86-video-geode (2.11.14), xorg-xf86-video-i740 (1.3.4), xorg-xf86-video-neomagic (1.2.7), xorg-xf86-video-nv (2.1.20), xorg-xf86-video-s3 (0.6.5), xorg-xf86-video-trident (1.3.6), xorg-xf86-video-vesa (2.3.2), xorg-xf86-video-vmware (13.0.1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 13 10:45:31 2013 +0200 (2013-06-13)
parents
children
line source
1 Partition can be ${dev}$num or ${dev}p$num
2 --- grub-0.97/lib/device.c
3 +++ grub-0.97/lib/device.c
4 @@ -867,6 +867,13 @@
5 fd = open (dev, O_RDWR);
6 if (fd < 0)
7 {
8 + strcpy (dev, map[drive]);
9 + sprintf (dev + strlen(dev), "p%d", ((partition >> 16) & 0xFF) + 1);
10 + fd = open (dev, O_RDWR);
11 + }
12 +
13 + if (fd < 0)
14 + {
15 errnum = ERR_NO_PART;
16 return 0;
17 }