/* autofs.c - support auto-loading from fs.lst */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2009 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/>.
*/
/* This is used to store the names of filesystem modules for auto-loading. */
/* The auto-loading hook for filesystems. */
static int
autoload_fs_module (void)
{
while ((p = fs_module_list) != NULL)
{
return 1;
if (grub_errno)
grub_print_error ();
fs_module_list = p->next;
grub_free (p);
}
return 0;
}
/* Read the file fs.lst for auto-loading. */
void
{
if (prefix)
{
char *filename;
if (filename)
{
/* This rules out the possibility that read_fs_list() is invoked
recursively when we call grub_file_open() below. */
if (file)
{
/* Override previous fs.lst. */
while (fs_module_list)
{
}
while (1)
{
char *buf;
char *p;
char *q;
if (! buf)
break;
p = buf;
/* Ignore space. */
while (grub_isspace (*p))
p++;
while (p < q && grub_isspace (*q))
*q-- = '\0';
/* If the line is empty, skip it. */
if (p >= q)
continue;
if (! fs_mod)
continue;
{
continue;
}
}
}
}
}
/* Ignore errors. */
/* Set the hook. */
}