2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>

* kern/err.c (grub_error_push): Added new function to support error
stacks.
(grub_error_pop): Likewise.
(grub_error_stack_items): New local variable to support error stacks.
(grub_error_stack_pos): Likewise.
(grub_error_stack_assert): Likewise.
(GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
stack depth.
(grub_print_error): Added support to print errors from error stack.

* include/grub/err.h (grub_error_push): Added function prototype.
(grub_error_pop): Likewise.
This commit is contained in:
chaac 2005-12-23 22:59:12 +00:00
parent be973c1ba6
commit 6a12410384
3 changed files with 96 additions and 5 deletions

View file

@ -1,7 +1,7 @@
/* err.h - error numbers and prototypes */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2003,2004 Free Software Foundation, Inc.
* Copyright (C) 2002-2005 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
@ -60,6 +60,8 @@ extern char EXPORT_VAR(grub_errmsg)[];
grub_err_t EXPORT_FUNC(grub_error) (grub_err_t n, const char *fmt, ...);
void EXPORT_FUNC(grub_fatal) (const char *fmt, ...) __attribute__ ((noreturn));
void EXPORT_FUNC(grub_error_push) (void);
int EXPORT_FUNC(grub_error_pop) (void);
void EXPORT_FUNC(grub_print_error) (void);
#endif /* ! GRUB_ERR_HEADER */