]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/ieee1275/ofpath.c: Move to ...
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 8 Oct 2013 16:25:49 +0000 (18:25 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 8 Oct 2013 16:25:49 +0000 (18:25 +0200)
* grub-core/osdep/linux/ofpath.c: ..here, split stub into ...
* grub-core/osdep/basic/ofpath.c: ..here.

ChangeLog
Makefile.util.def
grub-core/osdep/basic/ofpath.c [new file with mode: 0644]
grub-core/osdep/linux/ofpath.c [moved from util/ieee1275/ofpath.c with 98% similarity]
grub-core/osdep/ofpath.c [new file with mode: 0644]

index c08a045f3edbbf85039c3a33fd3e5045912dbf0f..15ad7dfe008f5a5424af756f9bafb8402da73555 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-10-08  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/ieee1275/ofpath.c: Move to ...
+       * grub-core/osdep/linux/ofpath.c: ..here, split stub into ...
+       * grub-core/osdep/basic/ofpath.c: ..here.
+
 2013-10-08  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Move password-querying (util-version) routines to grub-core/osdep.
index 9d781be141ecec84e6b9babe269e6212a4a691f9..a42562627647f500bd777977c64db87ab4cac575 100644 (file)
@@ -294,7 +294,7 @@ program = {
   installdir = sbin;
   mansection = 8;
   common = util/grub-probe.c;
-  common = util/ieee1275/ofpath.c;
+  common = grub-core/osdep/ofpath.c;
   common = grub-core/kern/emu/argp_common.c;
 
   ldadd = libgrubmods.a;
@@ -327,7 +327,7 @@ program = {
   common = util/grub-setup.c;
   common = grub-core/kern/emu/argp_common.c;
   common = grub-core/lib/reed_solomon.c;
-  common = util/ieee1275/ofpath.c;
+  common = grub-core/osdep/ofpath.c;
 
   ldadd = libgrubmods.a;
   ldadd = libgrubkern.a;
@@ -342,7 +342,7 @@ program = {
   installdir = sbin;
   mansection = 8;
   common = util/ieee1275/grub-ofpathname.c;
-  common = util/ieee1275/ofpath.c;
+  common = grub-core/osdep/ofpath.c;
 
   ldadd = libgrubmods.a;
   ldadd = libgrubgcry.a;
diff --git a/grub-core/osdep/basic/ofpath.c b/grub-core/osdep/basic/ofpath.c
new file mode 100644 (file)
index 0000000..c3fe06f
--- /dev/null
@@ -0,0 +1,29 @@
+/* ofpath.c - calculate OpenFirmware path names given an OS device */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2009, 2011,2012, 2013  Free Software Foundation, Inc.
+ *
+ *  GRUB is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/util/ofpath.h>
+#include <grub/mm.h>
+
+char *
+grub_util_devname_to_ofpath (const char *sys_devname __attribute__ ((unused)))
+{
+  return NULL;
+}
+
+
similarity index 98%
rename from util/ieee1275/ofpath.c
rename to grub-core/osdep/linux/ofpath.c
index c78de14a4ea7de289d6ac1f19bc354e858696b32..29ae56580cd68f6dc8d71e4dca2250c92f9c559e 100644 (file)
@@ -1,7 +1,7 @@
 /* ofpath.c - calculate OpenFirmware path names given an OS device */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2009  Free Software Foundation, Inc.
+ *  Copyright (C) 2009, 2011,2012, 2013  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -70,8 +70,6 @@ grub_util_info (const char *fmt, ...)
 #define xstrdup strdup
 #endif
 
-#ifndef _WIN32
-
 static void
 kill_trailing_dir(char *path)
 {
@@ -534,16 +532,6 @@ grub_util_devname_to_ofpath (const char *sys_devname)
   return ofpath;
 }
 
-#else
-
-char *
-grub_util_devname_to_ofpath (const char *sys_devname __attribute__ ((unused)))
-{
-  return NULL;
-}
-
-#endif
-
 #ifdef OFPATH_STANDALONE
 int main(int argc, char **argv)
 {
diff --git a/grub-core/osdep/ofpath.c b/grub-core/osdep/ofpath.c
new file mode 100644 (file)
index 0000000..1389b1d
--- /dev/null
@@ -0,0 +1,5 @@
+#if defined (__linux__)
+#include "linux/ofpath.c"
+#else
+#include "basic/ofpath.c"
+#endif