[grub/f17] Add symbolic link support for the uefi filesystem (mjg59)
Peter Jones
pjones at fedoraproject.org
Mon Apr 16 20:52:19 UTC 2012
commit 5cc3d54b67ed69f42b148f4df0e216acc467c1b3
Author: Peter Jones <pjones at redhat.com>
Date: Mon Apr 16 16:52:05 2012 -0400
Add symbolic link support for the uefi filesystem (mjg59)
grub-fedora-17.patch | 44 +++++++++++++++++++++++++++++++++++++++-----
grub.spec | 5 ++++-
2 files changed, 43 insertions(+), 6 deletions(-)
---
diff --git a/grub-fedora-17.patch b/grub-fedora-17.patch
index a6e17cf..59cc26b 100644
--- a/grub-fedora-17.patch
+++ b/grub-fedora-17.patch
@@ -1,5 +1,5 @@
From: Peter Jones <pjones at redhat.com>"
-Date: Fri Apr 13 17:02:02 EDT 2012
+Date: Mon Apr 16 16:50:27 EDT 2012
Subject: [PATCH] Changes from grub-0.97 to fedora-17
This patch is a bundle of the changes between grub-0.97 and fedora-17.
@@ -127,7 +127,7 @@ git diff grub-0.97 fedora-17
stage2/fsys_jfs.c | 12
stage2/fsys_minix.c | 10
stage2/fsys_reiserfs.c | 44
- stage2/fsys_uefi.c | 231 +
+ stage2/fsys_uefi.c | 265 +
stage2/fsys_vstafs.c | 28
stage2/fsys_xfs.c | 22
stage2/gpt.h | 69
@@ -153,7 +153,7 @@ git diff grub-0.97 fedora-17
util/Makefile.in | 478 --
util/grub-crypt.in | 80
util/grub-install.in | 334 +
- 142 files changed, 26279 insertions(+), 17652 deletions(-)
+ 142 files changed, 26313 insertions(+), 17652 deletions(-)
diff --git a/.gitignore b/.gitignore
new file mode 100644
@@ -43892,10 +43892,10 @@ index 93ec5f8..f46fcb2 100644
}
diff --git a/stage2/fsys_uefi.c b/stage2/fsys_uefi.c
new file mode 100644
-index 0000000..ecdb30f
+index 0000000..58b7050
--- /dev/null
+++ b/stage2/fsys_uefi.c
-@@ -0,0 +1,231 @@
+@@ -0,0 +1,265 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2001 Free Software Foundation, Inc.
@@ -44027,6 +44027,7 @@ index 0000000..ecdb30f
+ grub_printf(" ");
+ }
+ } else {
++ char *data = NULL;
+ dir_name_w = grub_malloc (2 * dirlen + 2);
+ if (!dir_name_w)
+ goto done;
@@ -44072,6 +44073,39 @@ index 0000000..ecdb30f
+ break;
+ }
+
++ if (fileinfo->filesize < 256 && fileinfo->filesize > 3)
++ {
++ data = grub_malloc(fileinfo->filesize);
++ filepos = 0;
++
++ uefi_read(data, fileinfo->filesize);
++
++ /*
++ * UEFI doesn't really support symlinks. Apple's UEFI driver exposes
++ * them as files containing the path of the target. This provides
++ * hacky support in the absence of a real driver.
++ */
++ if (data[0] == '.' && data[1] == '.' && data[2] == '/')
++ {
++ int j;
++ char *tmpdir = grub_malloc(dirlen + fileinfo->filesize);
++
++ for (j=0; j<dirlen+1; j++)
++ tmpdir[j] = dirname[j];
++ for (j=0; j<fileinfo->filesize; j++)
++ tmpdir[j+dirlen+1] = data[j];
++ tmpdir[j+dirlen+1] = '\0';
++
++ /* Open the new file */
++ ret = uefi_dir(tmpdir);
++ grub_free (tmpdir);
++ grub_free (data);
++ goto done;
++ }
++ }
++
++ if (data)
++ grub_free(data);
+ ret = 1;
+ filemax = fileinfo->filesize;
+ filepos = 0;
diff --git a/grub.spec b/grub.spec
index 9347de7..8cb8205 100644
--- a/grub.spec
+++ b/grub.spec
@@ -1,6 +1,6 @@
Name: grub
Version: 0.97
-Release: 89%{?dist}
+Release: 90%{?dist}
Epoch: 1
Summary: Grand Unified Boot Loader.
Group: System Environment/Base
@@ -120,6 +120,9 @@ fi
/sbin/grub-crypt
%changelog
+* Mon Apr 16 2012 Peter Jones <pjones at redhat.com> - 0.97-90
+- Add symbolic link support for the uefi filesystem (mjg59)
+
* Fri Apr 13 2012 Peter Jones <pjones at redhat.com> - 0.97-89
- Workaround Apple CD oddities (mjg59)
More information about the scm-commits
mailing list