summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-05-12 00:22:17 +0000
committerMiles Bader <miles@gnu.org>1995-05-12 00:22:17 +0000
commit14df4ec3b11e042575480e200902313e14b191df (patch)
tree62a2b071cd868c19963a8a34ec09983cf00f5d8f
parent827edc9909f42191476ce76408885935aec176bb (diff)
(ext2_error, ext2_warning, ext2_panic, all callers changed): Make these into
macros that automagically supply the caller's function name, and rename the original functions (which these macros call) to have an underline prefix. Get rid of the CHECK_STRICT variable.
-rw-r--r--ext2fs/ext2fs.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index 79e9d8cf..7a09f374 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -466,12 +466,14 @@ error_t dev_read_sync (block_t addr, vm_address_t *data, long len);
/* ---------------------------------------------------------------- */
-extern void ext2_error (const char *, const char *, ...)
+#define ext2_error(fmt, args...) _ext2_error (__FUNCTION__, fmt , ##args)
+extern void _ext2_error (const char *, const char *, ...)
__attribute__ ((format (printf, 2, 3)));
-extern void ext2_panic (const char *, const char *, ...)
- __attribute__ ((format (printf, 2, 3)));
-extern void ext2_warning (const char *, const char *, ...)
+
+#define ext2_panic(fmt, args...) _ext2_panic (__FUNCTION__, fmt , ##args)
+extern void _ext2_panic (const char *, const char *, ...)
__attribute__ ((format (printf, 2, 3)));
-/* Enable some more error checking. */
-int check_strict;
+#define ext2_warning(fmt, args...) _ext2_warning (__FUNCTION__, fmt , ##args)
+extern void _ext2_warning (const char *, const char *, ...)
+ __attribute__ ((format (printf, 2, 3)));