Репозитории 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-24.2-alt-blkid.patch
Скачать
Скачать
diff --git a/make.vars b/make.vars
index 4e47243..1640b3a 100644
--- lilo/make.vars
+++ lilo/make.vars
@@ -71,7 +71,7 @@
CONFIG=-DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DNOKEYBOARD -DONE_SHOT \
-DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL \
- -DMDPRAID -DDEVMAPPER
+ -DMDPRAID -DDEVMAPPER -DBLKID
# set the following if you wish LILO.COM to be installed
DOS_DIR=/dosC/boot
diff --git a/src/Makefile b/src/Makefile
index 9ac890a..7e9b2c5 100644
--- lilo/src/Makefile
+++ lilo/src/Makefile
@@ -25,6 +25,10 @@ G=`cat foo1 foo2 | grep version | cut -d " " -f 3`
CFLAGS=$(OPT) -Wall $(PCONFIG)
LIBS=$(DEVMAPPER)
+ifneq (,$(findstring BLKID,$(CONFIG)))
+LIBS+=-lblkid
+endif
+
OBJS=lilo.o raid.o map.o geometry.o boot.o device.o common.o bsect.o cfg.o \
partition.o identify.o probe.o shs2.o edit.o temp.o
diff --git a/src/lilo.c b/src/lilo.c
index a7db803..f0345d4 100644
--- lilo/src/lilo.c
+++ lilo/src/lilo.c
@@ -22,6 +22,10 @@
#include <dirent.h>
/*#include <asm/page.h>*/
+#ifdef LCF_BLKID
+#include <blkid/blkid.h>
+#endif
+
#include "config.h"
#include "lilo.h"
#include "common.h"
@@ -921,6 +925,20 @@ fprintf(errstd,"argc=%d, *argv=%s, ch=%c param=%s\n", argc, *argv, ch, param);
" disk addresses below the 1024 cylinder limit; LBA32 specifies 32-bit disk\n"
" addresses not subject to cylinder limits on systems with EDD-BIOS extensions;\n"
" use LINEAR only if you are aware of its limitations.");
+
+#ifdef LCF_BLKID
+{
+ char *boot_dev = cfg_get_strg(cf_options, "boot");
+
+ if (boot_dev && strlen(boot_dev) > 5 && !strncmp(boot_dev, "UUID=", 5)) {
+ char *dev = blkid_get_devname(NULL, boot_dev, NULL);
+ if (!dev)
+ die("%s: boot device not found", boot_dev);
+ cfg_unset(cf_options, "boot");
+ cfg_set(cf_options, "boot", dev, NULL);
+ }
+}
+#endif
if (identify) identify_image(identify,ident_opt);