/* crypto.c - support crypto autoload */
/*
* 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/>.
*/
struct load_spec
{
char *name;
char *modname;
};
static void
{
static int depth = 0;
/* Some bufio of filesystems may want some crypto modules.
It may result in infinite recursion. Hence this check. */
if (depth)
return;
depth++;
{
if (mod)
grub_dl_ref (mod);
}
depth--;
}
static void
grub_crypto_spec_free (void)
{
{
}
crypto_specs = NULL;
}
/* Read the file crypto.lst for auto-loading. */
void
{
char *filename;
if (!prefix)
{
return;
}
if (!filename)
{
return;
}
if (!file)
{
return;
}
/* Override previous crypto.lst. */
{
char *p, *name;
if (! buf)
break;
if (! p)
continue;
*p = '\0';
while (*++p == ' ')
;
if (!cur)
{
continue;
}
if (! name)
{
continue;
}
{
continue;
}
crypto_specs = cur;
}
}