Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37828877
en ru br
Репозитории 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
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: lilo

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: lilo-22.7.3-alt-blkid.patch
Скачать


diff -upk.orig lilo-22.7.3.orig/lilo.c lilo-22.7.3/lilo.c
--- lilo-22.7.3.orig/lilo.c	2006-12-29 14:14:48 +0000
+++ lilo-22.7.3/lilo.c	2006-12-29 14:18:48 +0000
@@ -23,6 +23,10 @@ source directory.
 #include <dirent.h>
 /*#include <asm/page.h>*/
 
+#ifdef LCF_BLKID
+#include <blkid/blkid.h>
+#endif
+
 #include "config.h"
 #include "lilo.h"
 #include "common.h"
@@ -912,6 +916,20 @@ extern int has_partitions_beta(dev_t dev
 	"  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);
 
diff -upk.orig lilo-22.7.3.orig/Makefile lilo-22.7.3/Makefile
--- lilo-22.7.3.orig/Makefile	2006-12-29 14:14:48 +0000
+++ lilo-22.7.3/Makefile	2006-12-29 14:17:13 +0000
@@ -66,7 +66,7 @@
 
 CONFIG=-DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DNOKEYBOARD -DONE_SHOT \
    -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL \
-   -DMDPRAID
+   -DMDPRAID -DBLKID
 
 # set the following if you wish LILO.COM to be installed
 DOS_DIR=/dosC/boot
@@ -117,6 +117,10 @@ CFLAGS=$(OPT) $(PCONFIG)
 LDFLAGS=#-Xlinker -qmagic
 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
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin