projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8249b71
)
error.h: Make PARA_STRERROR understand system errors.
author
Andre Noll
<maan@systemlinux.org>
Sun, 7 Oct 2007 19:52:47 +0000
(21:52 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Sun, 7 Oct 2007 19:52:47 +0000
(21:52 +0200)
error.h
patch
|
blob
|
history
diff --git
a/error.h
b/error.h
index d648f14e33abc54c11c6228b828c9542dbcb8060..5ed3830450b2b1e19bf76600513f1c7e7ebc562d 100644
(file)
--- a/
error.h
+++ b/
error.h
@@
-521,7
+521,11
@@
extern const char **para_errlist[];
*
* expands to the error text of \a num (a string constant).
*/
-#define PARA_STRERROR(num) para_errlist[ERRNUM_TO_SS(num)] [ERRNUM_TO_INDEX(num)]
+#define PARA_STRERROR(num) (num) & (1 << 30)? \
+ strerror((num) & ((1 << 30) - 1)) : \
+ para_errlist[ERRNUM_TO_SS(num)] [ERRNUM_TO_INDEX(num)]
+
+#define ERRNO_TO_PARA_ERROR(num) (-((num) | (1 << 30)))
/**
* define the error list for one subsystem