/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2007 Free Software Foundation, Inc.
*
* 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 <config.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
/* Module. */
struct mod_list
{
const char *name;
};
/* Dependency. */
struct dep_list
{
const char *name;
};
static void
{
while (head)
{
}
}
static void
{
while (head)
{
}
}
/* Read the list of dependencies. */
static struct dep_list *
{
{
char *p;
/* Get the target name. */
if (! p)
*p++ = '\0';
/* Add dependencies. */
while (*p)
{
char *name;
/* Skip whitespace. */
while (*p && isspace (*p))
p++;
if (! *p)
break;
name = p;
/* Skip non-whitespace. */
while (*p && ! isspace (*p))
p++;
*p++ = '\0';
}
}
return dep_list;
}
static char *
{
char *base;
char *ext;
if (! base)
else
base++;
{
char *name;
return name;
}
}
static char *
{
char *dir;
char *base;
char *ext;
char *ret;
else
{
}
if (dir)
return base;
return ret;
}
static void
struct grub_util_path_list **path_head,
const char *name)
{
char *mod_name;
/* Check if the module has already been added. */
{
return;
}
/* Resolve dependencies. */
{
break;
}
/* Add this module. */
/* Add this path. */
}
struct grub_util_path_list *
const char *dep_list_file,
char *modules[])
{
char *path;
if (! fp)
while (*modules)
{
modules++;
}
{ /* Reverse the path_list */
{
prev = p;
}
return prev;
}
}