Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37821770
en ru br
ALT Linux repos
S:4.04-alt19
D:3.61-alt1
5.0: 3.63-alt3
4.1: 3.36-alt2
4.0: 3.36-alt2
3.0: 2.11-alt1

Group :: System/Kernel and hardware
RPM: syslinux

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: syslinux-4.04-iso9660.diff
Download


diff --git a/core/fs/iso9660/iso9660.c b/core/fs/iso9660/iso9660.c
index 3cd3ac4..9bbc299 100644
--- a/core/fs/iso9660/iso9660.c
+++ b/core/fs/iso9660/iso9660.c
@@ -228,14 +228,25 @@ static int iso_readdir(struct file *file, struct dirent *dirent)
 /* Load the config file, return 1 if failed, or 0 */
 static int iso_load_config(void)
 {
-    static const char *search_directories[] = {
-	"/boot/isolinux", 
-	"/isolinux",
-	"/boot/syslinux", 
-	"/syslinux", 
-	"/",
-	NULL
-    };
+   /*
+    * Put search_directories[] to different section so it
+    * won't be compressed (and we can patch it later).
+    */
+    __asm__(
+      ".section .data16\n"
+      ".s1: .ascii \"/boot\"\n"
+      ".s2: .string \"/isolinux\"\n"
+      ".fill 64, 1, 0\n"
+      ".s3: .ascii \"/boot\"\n"
+      ".s4: .string \"/syslinux\"\n"
+      ".s5: .string \"/\"\n"
+      ".align 4\n"
+      "search_directories:\n"
+      ".long .s1, .s2, .s3, .s4, .s5, 0\n"
+      ".text\n"
+    );
+    extern const char *search_directories[];
+
     static const char *filenames[] = {
 	"isolinux.cfg",
 	"syslinux.cfg",
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin