grub2/debian/patches/core_in_fs.patch
2013-11-15 10:21:26 +00:00

33 lines
785 B
Diff

Index: b/util/setup.c
===================================================================
--- a/util/setup.c
+++ b/util/setup.c
@@ -58,6 +58,8 @@
#include <errno.h>
+#define CORE_IMG_IN_FS "setup_left_core_image_in_filesystem"
+
/* On SPARC this program fills in various fields inside of the 'boot' and 'core'
* image files.
*
@@ -577,6 +579,8 @@
grub_free (sectors);
+ unlink (DEFAULT_DIRECTORY "/" CORE_IMG_IN_FS);
+
goto finish;
}
@@ -619,6 +623,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);
+
grub_util_biosdisk_flush (root_dev->disk);
/* Clean out the blocklists. */