2008-08-14 Felix Zielcke <fzielcke@z-51.de>
* include/grub/err.h (grub_err_printf): New function prototype. * util/misc.c (grub_err_printf): New function. * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for grub_printf. * kern/err.c (grub_print_error): Use grub_err_printf.
This commit is contained in:
parent
7161f0e02b
commit
b86408f869
5 changed files with 33 additions and 5 deletions
15
util/misc.c
15
util/misc.c
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2003,2005,2006,2007 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002,2003,2005,2006,2007,2008 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
|
||||
|
@ -74,6 +74,19 @@ grub_util_error (const char *fmt, ...)
|
|||
exit (1);
|
||||
}
|
||||
|
||||
int
|
||||
grub_err_printf (const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
va_start (ap, fmt);
|
||||
ret = vfprintf (stderr, fmt, ap);
|
||||
va_end (ap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void *
|
||||
xmalloc (size_t size)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue