]> git.proxmox.com Git - grub2.git/blob - include/grub/err.h
2003-10-27 Marco Gerards <metgerards@student.han.nl>
[grub2.git] / include / grub / err.h
1 /* err.h - error numbers and prototypes */
2 /*
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>
6 *
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.
11 *
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.
16 *
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.
20 */
21
22 #ifndef PUPA_ERR_HEADER
23 #define PUPA_ERR_HEADER 1
24
25 #include <pupa/symbol.h>
26
27 typedef enum
28 {
29 PUPA_ERR_NONE = 0,
30 PUPA_ERR_BAD_MODULE,
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,
36 PUPA_ERR_UNKNOWN_FS,
37 PUPA_ERR_BAD_FS,
38 PUPA_ERR_BAD_NUMBER,
39 PUPA_ERR_OUT_OF_RANGE,
40 PUPA_ERR_UNKNOWN_DEVICE,
41 PUPA_ERR_BAD_DEVICE,
42 PUPA_ERR_READ_ERROR,
43 PUPA_ERR_WRITE_ERROR,
44 PUPA_ERR_UNKNOWN_COMMAND,
45 PUPA_ERR_BAD_ARGUMENT,
46 PUPA_ERR_BAD_PART_TABLE,
47 PUPA_ERR_UNKNOWN_OS,
48 PUPA_ERR_BAD_OS,
49 PUPA_ERR_NO_KERNEL,
50 PUPA_ERR_BAD_FONT,
51 PUPA_ERR_NOT_IMPLEMENTED_YET,
52 PUPA_ERR_SYMLINK_LOOP
53 }
54 pupa_err_t;
55
56 extern pupa_err_t EXPORT_VAR(pupa_errno);
57 extern char EXPORT_VAR(pupa_errmsg)[];
58
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);
62
63 #endif /* ! PUPA_ERR_HEADER */