* util/ieee1275/ofpath.c: Move to ...

* grub-core/osdep/linux/ofpath.c: ..here, split stub into ...
	* grub-core/osdep/basic/ofpath.c: ..here.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-10-08 18:25:49 +02:00
parent 4a445f580b
commit 9a2c903f28
5 changed files with 44 additions and 16 deletions

View File

@ -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.

View 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;

View File

@ -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;
}

View 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)
{

5
grub-core/osdep/ofpath.c Normal file
View File

@ -0,0 +1,5 @@
#if defined (__linux__)
#include "linux/ofpath.c"
#else
#include "basic/ofpath.c"
#endif