summaryrefslogtreecommitdiff
path: root/kern/error.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-10-02 20:21:24 +0200
committerRichard Braun <rbraun@sceen.net>2014-10-02 20:21:24 +0200
commitb9973d910b97b734c80b1dd24777b4d53aaaadb2 (patch)
tree98c8b6e788ef37572aa9bce166a1089808a8aeed /kern/error.h
parentceb740dd22153a4aa1c3915b9122a542f5183ab0 (diff)
kern/error: new error_check function
Diffstat (limited to 'kern/error.h')
-rw-r--r--kern/error.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/kern/error.h b/kern/error.h
index bdb6bda..0d8bf73 100644
--- a/kern/error.h
+++ b/kern/error.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013 Richard Braun.
+ * Copyright (c) 2012-2014 Richard Braun.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,4 +23,10 @@
#define ERROR_INVAL 3
#define ERROR_BUSY 4
+/*
+ * If error denotes an actual error (i.e. is not 0), panic, using the given
+ * string as a prefix for the error message. A NULL prefix is allowed.
+ */
+void error_check(int error, const char *prefix);
+
#endif /* _KERN_ERROR_H */