Репозитории ALT
S: | 24.2-alt3 |
5.1: | 22.7.3-alt6.M51.1 |
4.1: | 22.7.3-alt5 |
4.0: | 22.7.3-alt5 |
3.0: | 22.4.1-alt9 |
Группа :: Система/Ядро и оборудование
Пакет: lilo
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: lilo-23.0-alt-raid_index.patch
Скачать
Скачать
diff -urN lilo-23.0/src/common.c lilo-23.0-alt-raid_index/src/common.c
--- lilo-23.0/src/common.c 2010-06-29 00:45:41.000000000 +0300
+++ lilo-23.0-alt-raid_index/src/common.c 2013-09-23 05:21:36.000000000 +0300
@@ -23,7 +23,7 @@
#ifndef SHS_MAIN
LILO_EXTRA extra;
char *identify = NULL;
-int boot_dev_nr, raid_index, do_md_install;
+int boot_dev_nr, raid_index = -1, do_md_install;
int verbose = 0, test = 0, compact = 0, linear = 0, raid_flags = 0, zflag = 0,
ireloc = 0, force_fs = 0, force_raid = 0, extended_pt = 0, query = 0,
nowarn = 0, lba32 = 0, autoauto = 0, passw = 0, geometric = 0, eflag = 0;
diff -urN lilo-23.0/src/geometry.c lilo-23.0-alt-raid_index/src/geometry.c
--- lilo-23.0/src/geometry.c 2010-06-29 00:45:41.000000000 +0300
+++ lilo-23.0-alt-raid_index/src/geometry.c 2013-09-23 05:21:36.000000000 +0300
@@ -1123,17 +1123,16 @@
die("Only RAID1 devices are supported for boot images");
raid_limit = md_array_info.raid_disks + md_array_info.spare_disks;
- /* version 22.7 */
-#if 1
+if (raid_index >= 0)
+{
is_raid = (device==boot_dev_nr);
md_disk_info.number = raid_index;
if (ioctl(md_fd,GET_DISK_INFO,&md_disk_info) < 0)
die("GET_DISK_INFO: %s", mdxxx);
device = MKDEV(md_disk_info.major, md_disk_info.minor);
-#else /* prior to 22.7 */
-{
-int pass;
+} else {
+ int pass, dev;
for (pass = 0; pass < raid_limit; pass++) {
md_disk_info.number = pass;
if (ioctl(md_fd,GET_DISK_INFO,&md_disk_info) < 0)
@@ -1152,12 +1151,13 @@
/* this change may be in error; the correct comparison is == */
is_raid = (device!=boot_dev_nr);
#endif
- device = MKDEV(md_disk_info.major, md_disk_info.minor);
+ dev = MKDEV(md_disk_info.major, md_disk_info.minor);
+ if (!dev) continue;
+ device = dev;
break;
}
}
}
-#endif /* end of code prior to version 22.7 */
close(md_fd);
}