/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2005,2007,2009,2010 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 <grub/script_sh.h>
struct grub_script *cmd)
{
if (! func)
return 0;
{
return 0;
}
/* Keep the list sorted for simplicity. */
while (*p)
{
break;
p = &((*p)->next);
}
/* If the function already exists, overwrite the old function. */
{
q = *p;
grub_script_free (q->func);
func = q;
}
else
{
*p = func;
}
return func;
}
void
{
grub_script_function_t *p, q;
{
*p = q->next;
grub_script_free (q->func);
grub_free (q);
break;
}
}
{
break;
if (! func)
{
tmp[20] = 0;
/* Avoid truncating inside UTF-8 character. */
}
return func;
}