wok view grub/stuff/dev_partition.diff @ rev 5074

get-flash-plugin: re-export firefox libs if not found
author Rohit Joshi <jozee@slitaz.org>
date Fri Mar 12 11:43:55 2010 +0000 (2010-03-12)
parents
children 5af4ef0cffa1
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,12 @@
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 + }
11 +
12 + if (fd < 0)
13 + {
14 errnum = ERR_NO_PART;
15 return 0;
16 }