blob: 7b597ea2ca721047b3337260794239e0711a5433 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
Index: b/util/grub-setup.c
===================================================================
--- a/util/grub-setup.c
+++ b/util/grub-setup.c
@@ -76,6 +76,7 @@
#define DEFAULT_BOOT_FILE "boot.img"
#define DEFAULT_CORE_FILE "core.img"
+#define CORE_IMG_IN_FS "setup_left_core_image_in_filesystem"
#ifdef GRUB_MACHINE_SPARC64
#define grub_target_to_host16(x) grub_be_to_cpu16(x)
@@ -489,6 +490,8 @@
grub_free (sectors);
+ unlink (DEFAULT_DIRECTORY "/" CORE_IMG_IN_FS);
+
goto finish;
}
#endif
@@ -514,6 +517,9 @@
/* The core image must be put on a filesystem unfortunately. */
grub_util_info ("will leave the core image on the filesystem");
+ fp = fopen (DEFAULT_DIRECTORY "/" CORE_IMG_IN_FS, "w");
+ fclose (fp);
+
/* Make sure that GRUB reads the identical image as the OS. */
tmp_img = xmalloc (core_size);
core_path_dev_full = grub_util_get_path (dir, core_file);
|