wok-6.x diff grub4dos/stuff/dev_partition.diff @ rev 10408

zlib: clean gain, no need of glibc in dep, it's a dep for ALL packages
author Christophe Lincoln <pankso@slitaz.org>
date Tue May 24 12:53:18 2011 +0200 (2011-05-24)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/grub4dos/stuff/dev_partition.diff	Tue May 24 12:53:18 2011 +0200
     1.3 @@ -0,0 +1,17 @@
     1.4 +Partition can be ${dev}$num or ${dev}p$num
     1.5 +--- grub-0.97/lib/device.c
     1.6 ++++ grub-0.97/lib/device.c
     1.7 +@@ -867,6 +867,13 @@
     1.8 +   fd = open (dev, O_RDWR);
     1.9 +   if (fd < 0)
    1.10 +     {
    1.11 ++      strcpy (dev, map[drive]);
    1.12 ++      sprintf (dev + strlen(dev), "p%d", ((partition >> 16) & 0xFF) + 1);
    1.13 ++      fd = open (dev, O_RDWR);
    1.14 ++    }
    1.15 ++  
    1.16 ++  if (fd < 0)
    1.17 ++    {
    1.18 +       errnum = ERR_NO_PART;
    1.19 +       return 0;
    1.20 +     }