Package: grub Severity: normal Tags: patch This patch adds device.map support for I2O devices (/dev/i2o/*).
-- Robert Millan [EMAIL PROTECTED] Departamento de Asistencia Técnica Oficina central: (+34) 902 888 345 Asistencia técnica: (+34) 902 888 408 ACK STORM, S.L. http://www.ackstorm.es Este mensaje electrónico contiene información de ACK STORM, S.L. que es privada y confidencial, siendo para el uso exclusivo de las personas o entidades arriba mencionadas. Si usted no es el destinatario señalado, le informamos que cualquier divulgación, copia, distribución o uso de los contenidos está prohibida. Si usted ha recibido este mensaje por error, por favor borre su contenido y comuníquenoslo en la dirección [EMAIL PROTECTED] --------------------------------------------------
diff -ur grub-0.97.old/lib/device.c grub-0.97/lib/device.c --- grub-0.97.old/lib/device.c 2006-06-21 14:51:37.000000000 -0400 +++ grub-0.97/lib/device.c 2006-06-21 14:52:10.000000000 -0400 @@ -560,6 +560,12 @@ { sprintf (name, "/dev/ataraid/d%c", unit + '0'); } + +static void +get_i2o_disk_name (char *name, char unit) +{ + sprintf (name, "/dev/i2o/hd%c", unit); +} #endif /* Check if DEVICE can be read. If an error occurs, return zero, @@ -1022,6 +1028,29 @@ } } } + + /* This is for I2O - we have /dev/i2o/hd<logical drive><partition> */ + { + int unit; + + for (unit = 'a'; unit < 'f'; unit++) + { + char name[24]; + + get_i2o_disk_name (name, unit); + if (check_device (name)) + { + (*map)[num_hd + 0x80] = strdup (name); + assert ((*map)[num_hd + 0x80]); + + /* If the device map file is opened, write the map. */ + if (fp) + fprintf (fp, "(hd%d)\t%s\n", num_hd, name); + + num_hd++; + } + } + } #endif /* __linux__ */ /* OK, close the device map file if opened. */ @@ -1088,6 +1117,7 @@ (strncmp(dev, "/dev/ida/", 9) == 0 || strncmp(dev, "/dev/ataraid/", 13) == 0 || strncmp(dev, "/dev/cciss/", 11) == 0 || + strncmp(dev, "/dev/i2o/", 9) == 0 || strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "", ((partition >> 16) & 0xFF) + 1);