27.12.2015 23:48, Thomas Schmitt пишет:
> Hi,
> 
> when running grub-mkrescue from Debian Sid, i get a
> growing collection of files in /tmp. One per run.
> 
> Names are like:
>   /tmp/grub.00529W
> 
> Content is always the same:
>   insmod part_acorn
>   insmod part_amiga
>   insmod part_apple
>   insmod part_bsd
>   insmod part_dfly
>   insmod part_dvh
>   insmod part_gpt
>   insmod part_msdos
>   insmod part_plan
>   insmod part_sun
>   insmod part_sunpc
> 

That's load.cfg used to build image. I'm surprised this is the only one
left, there should be more.

> grub-mkrescue -V
>   grub-mkrescue (GRUB) 2.02~beta2-33
> 
> Where to report ? Upstream or distro ?
> 

Yes, I have this hanging around. Not because of garbage in /tmp, but to
better documentation of generated image (load.cfg is stored by
grub-install as well).

Vladimir?



From: Andrey Borzenkov <arvidj...@gmail.com>
Subject: [PATCH] grub-mkrescue: save load.cfg in image platform directory

---
 util/grub-mkrescue.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
index 4511826..ed86d44 100644
--- a/util/grub-mkrescue.c
+++ b/util/grub-mkrescue.c
@@ -257,7 +257,9 @@ make_image_abs (enum grub_install_plat plat,
   grub_util_info (N_("enabling %s support ..."),
 		  mkimage_target);
 
-  load_cfg = grub_util_make_temporary_file ();
+  load_cfg = grub_util_path_concat (3, boot_grub,
+				    grub_install_get_platform_name (plat),
+				    "load.cfg");
 
   load_cfg_f = grub_util_fopen (load_cfg, "wb");
   fprintf (load_cfg_f, "search --fs-uuid --set=root %s\n", iso_uuid);
@@ -273,7 +275,7 @@ make_image_abs (enum grub_install_plat plat,
 				mkimage_target, 0);
   grub_install_pop_module ();
   grub_install_pop_module ();
-  grub_util_unlink (load_cfg);
+  free (load_cfg);
 }
 
 static void
@@ -300,7 +302,9 @@ make_image_fwdisk_abs (enum grub_install_plat plat,
   grub_util_info (N_("enabling %s support ..."),
 		  mkimage_target);
 
-  load_cfg = grub_util_make_temporary_file ();
+  load_cfg = grub_util_path_concat (3, boot_grub,
+				    grub_install_get_platform_name (plat),
+				    "load.cfg");
 
   load_cfg_f = grub_util_fopen (load_cfg, "wb");
   write_part (load_cfg_f, source_dirs[plat]);
@@ -310,6 +314,7 @@ make_image_fwdisk_abs (enum grub_install_plat plat,
   grub_install_make_image_wrap (source_dirs[plat], "()/boot/grub", output,
 				0, load_cfg, mkimage_target, 0);
   grub_install_pop_module ();
+  free (load_cfg);
 }
 
 static int
@@ -572,7 +577,7 @@ main (int argc, char *argv[])
       char *load_cfg;
       FILE *load_cfg_f;
       char *output = grub_util_path_concat (3, boot_grub, "i386-pc", "eltorito.img");
-      load_cfg = grub_util_make_temporary_file ();
+      load_cfg = grub_util_path_concat (3, boot_grub, "i386-pc", "load.cfg");
 
       grub_util_info (N_("enabling %s support ..."), "BIOS");
       load_cfg_f = grub_util_fopen (load_cfg, "wb");
@@ -647,6 +652,7 @@ main (int argc, char *argv[])
 	}
       grub_install_pop_module ();
       grub_install_pop_module ();
+      free (load_cfg);
     }
 
   /** build multiboot core.img */
-- 
tg: (3bca85b..) u/load_cfg (depends on: master)
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to