[grub] Fix another minor patching problem
Peter Jones
pjones at fedoraproject.org
Tue Aug 31 14:48:32 UTC 2010
commit d8c6ff0636185fc1a2567fd3190c474261c726a4
Author: Peter Jones <pjones at redhat.com>
Date: Tue Aug 31 10:46:51 2010 -0400
Fix another minor patching problem
grub-0.97-version-command-rhbz621989.patch | 107 ++++++++++++++++++++++++---
1 files changed, 95 insertions(+), 12 deletions(-)
---
diff --git a/grub-0.97-version-command-rhbz621989.patch b/grub-0.97-version-command-rhbz621989.patch
index df46e15..e6620bd 100644
--- a/grub-0.97-version-command-rhbz621989.patch
+++ b/grub-0.97-version-command-rhbz621989.patch
@@ -1,24 +1,20 @@
-From 3133f0232277af8a480185a16824bd1328740911 Mon Sep 17 00:00:00 2001
From: Brian C. Lane <bcl at redhat.com>
Date: Tue, 10 Aug 2010 15:49:17 -0700
Subject: [PATCH] Add full version output and version command (#621989)
Resolves: rhbz#621989
----
- stage2/builtins.c | 22 +++++++++++++++++++++-
- 1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/stage2/builtins.c b/stage2/builtins.c
-index de356d4..1eb1912 100644
+index 9f6dde9..c90c527 100644
--- a/stage2/builtins.c
+++ b/stage2/builtins.c
-@@ -5148,7 +5148,26 @@ static struct builtin builtin_vbeprobe =
+@@ -5187,7 +5187,26 @@ static struct builtin builtin_vbeprobe =
" the information about only the mode."
};
#endif /* ! PLATFORM_EFI */
-
+
-+
++
+/* version */
+static int
+version_func (char *arg, int flags)
@@ -37,16 +33,103 @@ index de356d4..1eb1912 100644
+ "Display grub version."
+};
+
-
+
/* The table of builtin commands. Sorted in dictionary order. */
struct builtin *builtin_table[] =
-@@ -5268,5 +5287,6 @@ struct builtin *builtin_table[] =
+@@ -5310,5 +5329,6 @@ struct builtin *builtin_table[] =
&builtin_vbeprobe,
#endif
&builtin_verbose,
+ &builtin_version,
0
};
---
-1.7.2.1
-
+diff --git a/stage2/builtins.c.orig b/stage2/builtins.c.orig
+index 2171296..9f6dde9 100644
+--- a/stage2/builtins.c.orig
++++ b/stage2/builtins.c.orig
+@@ -926,7 +926,7 @@ static struct builtin builtin_default =
+ };
+
+
+-#ifdef GRUB_UTIL
++#if defined(GRUB_UTIL) || defined(PLATFORM_EFI)
+ /* device */
+ static int
+ device_func (char *arg, int flags)
+@@ -934,16 +934,17 @@ device_func (char *arg, int flags)
+ char *drive = arg;
+ char *device;
+
+- /* Get the drive number from DRIVE. */
+- if (! set_device (drive))
+- return 1;
+-
+ /* Get the device argument. */
+ device = skip_to (0, drive);
+-
++
++ nul_terminate (drive);
+ /* Terminate DEVICE. */
+ nul_terminate (device);
+
++ /* Get the drive number from DRIVE. */
++ if (! set_device (drive))
++ return 1;
++
+ if (! *device || ! check_device (device))
+ {
+ errnum = ERR_FILE_NOT_FOUND;
+@@ -951,7 +952,7 @@ device_func (char *arg, int flags)
+ }
+
+ assign_device_name (current_drive, device);
+-
++
+ return 0;
+ }
+
+@@ -962,9 +963,20 @@ static struct builtin builtin_device =
+ BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
+ "device DRIVE DEVICE",
+ "Specify DEVICE as the actual drive for a BIOS drive DRIVE. This command"
+- " can be used only in the grub shell."
++ " can be used only in the grub shell and in EFI."
+ };
+-#endif /* GRUB_UTIL */
++#endif /* defined(GRUB_UTIL) || defined(PLATFORM_EFI) */
++#ifdef PLATFORM_EFI
++static struct builtin builtin_efimap =
++{
++ "efimap",
++ device_func,
++ BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
++ "efimap DRIVE DEVICE",
++ "Specify DEVICE as the actual drive for a BIOS drive DRIVE. This command"
++ " can be used only in EFI."
++};
++#endif /* PLATFORM_EFI */
+
+
+ #ifdef SUPPORT_NETBOOT
+@@ -5196,9 +5208,9 @@ struct builtin *builtin_table[] =
+ &builtin_configfile,
+ &builtin_debug,
+ &builtin_default,
+-#ifdef GRUB_UTIL
++#if defined(GRUB_UTIL) || defined(PLATFORM_EFI)
+ &builtin_device,
+-#endif /* GRUB_UTIL */
++#endif /* defined(GRUB_UTIL) || defined(PLATFORM_EFI) */
+ #ifdef SUPPORT_NETBOOT
+ &builtin_dhcp,
+ #endif /* SUPPORT_NETBOOT */
+@@ -5209,6 +5221,9 @@ struct builtin *builtin_table[] =
+ #ifdef GRUB_UTIL
+ &builtin_dump,
+ #endif /* GRUB_UTIL */
++#ifdef PLATFORM_EFI
++ &builtin_efimap,
++#endif
+ #ifndef PLATFORM_EFI
+ &builtin_embed,
+ #endif
More information about the scm-commits
mailing list