summaryrefslogtreecommitdiffstats
path: root/master/debian/core_in_fs.patch
diff options
context:
space:
mode:
authorroot <root@arianrhod.panaceas.james.local>2012-11-16 11:52:02 +0000
committerroot <root@arianrhod.panaceas.james.local>2012-11-16 11:52:02 +0000
commita109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce (patch)
tree9a6b9c35465b23ce5871feec5e9ba0c7d5ac7797 /master/debian/core_in_fs.patch
downloadgrub-1.99-pq-a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce.tar.gz
grub-1.99-pq-a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce.tar.bz2
grub-1.99-pq-a109bb6d0eb936ac4e2a9f0ee46a269a58ec48ce.zip
fish
Diffstat (limited to 'master/debian/core_in_fs.patch')
-rw-r--r--master/debian/core_in_fs.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/master/debian/core_in_fs.patch b/master/debian/core_in_fs.patch
new file mode 100644
index 0000000..7b597ea
--- /dev/null
+++ b/master/debian/core_in_fs.patch
@@ -0,0 +1,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);