[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[1805] 2008-08-14 Felix Zielcke <address@hidden>
From: |
Felix Zielcke |
Subject: |
[1805] 2008-08-14 Felix Zielcke <address@hidden> |
Date: |
Thu, 14 Aug 2008 18:46:48 +0000 |
Revision: 1805
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1805
Author: fzielcke
Date: 2008-08-14 18:46:47 +0000 (Thu, 14 Aug 2008)
Log Message:
-----------
2008-08-14 Felix Zielcke <address@hidden>
* 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.
Modified Paths:
--------------
trunk/grub2/ChangeLog
trunk/grub2/include/grub/err.h
trunk/grub2/kern/err.c
trunk/grub2/kern/misc.c
trunk/grub2/util/misc.c
Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog 2008-08-13 16:59:12 UTC (rev 1804)
+++ trunk/grub2/ChangeLog 2008-08-14 18:46:47 UTC (rev 1805)
@@ -1,3 +1,11 @@
+2008-08-14 Felix Zielcke <address@hidden>
+
+ * 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.
+
2008-08-13 Robert Millan <address@hidden>
* docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
Modified: trunk/grub2/include/grub/err.h
===================================================================
--- trunk/grub2/include/grub/err.h 2008-08-13 16:59:12 UTC (rev 1804)
+++ trunk/grub2/include/grub/err.h 2008-08-14 18:46:47 UTC (rev 1805)
@@ -1,7 +1,7 @@
/* err.h - error numbers and prototypes */
/*
* GRUB -- GRand Unified Bootloader
- * Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
+ * Copyright (C) 2002,2005,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
@@ -64,5 +64,7 @@
void EXPORT_FUNC(grub_error_push) (void);
int EXPORT_FUNC(grub_error_pop) (void);
void EXPORT_FUNC(grub_print_error) (void);
+int EXPORT_FUNC(grub_err_printf) (const char *fmt, ...)
+__attribute__ ((format (printf, 1, 2)));
#endif /* ! GRUB_ERR_HEADER */
Modified: trunk/grub2/kern/err.c
===================================================================
--- trunk/grub2/kern/err.c 2008-08-13 16:59:12 UTC (rev 1804)
+++ trunk/grub2/kern/err.c 2008-08-14 18:46:47 UTC (rev 1805)
@@ -1,7 +1,7 @@
/* err.c - error handling routines */
/*
* GRUB -- GRand Unified Bootloader
- * Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
+ * Copyright (C) 2002,2005,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
@@ -121,14 +121,14 @@
do
{
if (grub_errno != GRUB_ERR_NONE)
- grub_printf ("error: %s\n", grub_errmsg);
+ grub_err_printf ("error: %s\n", grub_errmsg);
}
while (grub_error_pop ());
/* If there was an assert while using error stack, report about it. */
if (grub_error_stack_assert)
{
- grub_printf ("assert: error stack overflow detected!\n");
+ grub_err_printf ("assert: error stack overflow detected!\n");
grub_error_stack_assert = 0;
}
}
Modified: trunk/grub2/kern/misc.c
===================================================================
--- trunk/grub2/kern/misc.c 2008-08-13 16:59:12 UTC (rev 1804)
+++ trunk/grub2/kern/misc.c 2008-08-14 18:46:47 UTC (rev 1805)
@@ -134,6 +134,11 @@
return ret;
}
+#ifndef GRUB_UTIL
+int grub_err_printf (const char *fmt, ...)
+__attribute__ ((alias("grub_printf")));
+#endif
+
void
grub_real_dprintf (const char *file, const int line, const char *condition,
const char *fmt, ...)
Modified: trunk/grub2/util/misc.c
===================================================================
--- trunk/grub2/util/misc.c 2008-08-13 16:59:12 UTC (rev 1804)
+++ trunk/grub2/util/misc.c 2008-08-14 18:46:47 UTC (rev 1805)
@@ -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 @@
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)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [1805] 2008-08-14 Felix Zielcke <address@hidden>,
Felix Zielcke <=