author | Tero Marttila <terom@fixme.fi> |
Tue, 18 Nov 2008 01:55:13 +0200 | |
changeset 41 | 6abda2fa4579 |
parent 36 | 56427f22e969 |
child 44 | 9e76ee9729b6 |
permissions | -rw-r--r-- |
8 | 1 |
#ifndef LIB_ERROR_H |
2 |
#define LIB_ERROR_H |
|
3 |
||
11 | 4 |
#include "log.h" |
5 |
||
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
36
diff
changeset
|
6 |
/* |
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
36
diff
changeset
|
7 |
* err_t is always positive |
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
36
diff
changeset
|
8 |
*/ |
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
36
diff
changeset
|
9 |
typedef unsigned int err_t; |
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
36
diff
changeset
|
10 |
|
8 | 11 |
#define ERROR(...) do { err_func(__func__, __VA_ARGS__); goto error; } while (0) |
12 |
#define PERROR(...) do { perr_func(__func__, __VA_ARGS__); goto error; } while (0) |
|
13 |
#define EERROR(_err, ...) do { eerr_func(__func__, (_err), __VA_ARGS__); goto error; } while (0) |
|
24 | 14 |
#define NERROR(...) do { err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0) |
33 | 15 |
#define SERROR(_err) do { (_err); goto error; } while (0) |
36
56427f22e969
tweak debug/info output, implement dbfs_unlink with slightly improved error macros handling
Tero Marttila <terom@fixme.fi>
parents:
33
diff
changeset
|
16 |
#define XERROR(_err, ...) do { (_err); err_func(__func__, __VA_ARGS__); goto error; } while (0) |
56427f22e969
tweak debug/info output, implement dbfs_unlink with slightly improved error macros handling
Tero Marttila <terom@fixme.fi>
parents:
33
diff
changeset
|
17 |
#define NXERROR(_err, ...) do { (_err); err_func_nonl(__func__, __VA_ARGS__); goto error; } while (0) |
8 | 18 |
|
28
e944453ca924
split off dbfs components into a separate dir, improve dirop docs, error handling, etc
Tero Marttila <terom@fixme.fi>
parents:
24
diff
changeset
|
19 |
// XXX: replace with *err_func(...) + exit(EXIT_FAILURE) |
11 | 20 |
#define FATAL(...) err_func_exit(__func__, __VA_ARGS__) |
21 |
#define PFATAL(...) perr_func_exit(__func__, __VA_ARGS__) |
|
28
e944453ca924
split off dbfs components into a separate dir, improve dirop docs, error handling, etc
Tero Marttila <terom@fixme.fi>
parents:
24
diff
changeset
|
22 |
#define EFATAL(_err, ...) eerr_func_exit(__func__, (_err), __VA_ARGS__) |
11 | 23 |
|
8 | 24 |
#endif /* LIB_ERROR_H */ |