1 /* err.h - error numbers and prototypes */
3 * PUPA -- Preliminary Universal Programming Architecture for GRUB
4 * Copyright (C) 2002 Yoshinori K. Okuji <okuji@enbug.org>
5 * Copyright (C) 2002 Marco Gerards <metgerards@student.han.nl>
7 * PUPA is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with PUPA; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #ifndef PUPA_ERR_HEADER
23 #define PUPA_ERR_HEADER 1
25 #include <pupa/symbol.h>
31 PUPA_ERR_OUT_OF_MEMORY
,
32 PUPA_ERR_BAD_FILE_TYPE
,
33 PUPA_ERR_FILE_NOT_FOUND
,
34 PUPA_ERR_FILE_READ_ERROR
,
35 PUPA_ERR_BAD_FILENAME
,
39 PUPA_ERR_OUT_OF_RANGE
,
40 PUPA_ERR_UNKNOWN_DEVICE
,
44 PUPA_ERR_UNKNOWN_COMMAND
,
45 PUPA_ERR_BAD_ARGUMENT
,
46 PUPA_ERR_BAD_PART_TABLE
,
51 PUPA_ERR_NOT_IMPLEMENTED_YET
,
56 extern pupa_err_t
EXPORT_VAR(pupa_errno
);
57 extern char EXPORT_VAR(pupa_errmsg
)[];
59 pupa_err_t
EXPORT_FUNC(pupa_error
) (pupa_err_t n
, const char *fmt
, ...);
60 void EXPORT_FUNC(pupa_fatal
) (const char *fmt
, ...) __attribute__ ((noreturn
));
61 void EXPORT_FUNC(pupa_print_error
) (void);
63 #endif /* ! PUPA_ERR_HEADER */