wok view grub/stuff/dev_partition.diff @ rev 8615
Fix: replace exit 1 by return 1 in receipts (exit broke cook-list function)
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Mon Feb 14 19:09:46 2011 +0100 (2011-02-14) |
parents | ae53586561c8 |
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 }