diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-12 16:13:07 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-15 10:59:20 +0200 |
commit | 72758b677ad240fd80b769e92f85c639860e6b97 (patch) | |
tree | 788d19d2658fc355215aebd9a1eba7ffecd53048 /ext2fs/ext2fs.h | |
parent | 68af46b57f817f84cf12bdacc32a1878e1c0fafa (diff) |
ext2fs: improve ext2fs debugging
* ext2fs/ext2fs.h (ext2_debug): Print to stderr.
(printf): Drop declaration.
Diffstat (limited to 'ext2fs/ext2fs.h')
-rw-r--r-- | ext2fs/ext2fs.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h index 96d8e9db..0009af0f 100644 --- a/ext2fs/ext2fs.h +++ b/ext2fs/ext2fs.h @@ -50,9 +50,10 @@ typedef int8_t __s8; #undef ext2_debug #ifdef EXT2FS_DEBUG +#include <stdio.h> extern int ext2_debug_flag; #define ext2_debug(f, a...) \ - do { if (ext2_debug_flag) printf ("ext2fs: (debug) %s: " f "\n", __FUNCTION__ , ## a); } while (0) + do { if (ext2_debug_flag) fprintf (stderr, "ext2fs: (debug) %s: " f "\n", __FUNCTION__ , ## a); } while (0) #else #define ext2_debug(f, a...) (void)0 #endif @@ -65,8 +66,6 @@ extern int ext2_debug_flag; #undef DONT_CACHE_MEMORY_OBJECTS -int printf (const char *fmt, ...); - /* A block number. */ typedef __u32 block_t; |