Skip to content

Commit

Permalink
add new debug macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Fietkau committed Jun 24, 2012
1 parent 4bff1b5 commit 4a1bfc6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions procd.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
fprintf(stderr, "DEBUG %s(%d): " fmt, __func__, __LINE__, ## __VA_ARGS__); \
} while (0)

#define DEBUG(level, fmt, ...) do { \
if (debug >= level) \
fprintf(stderr, "DEBUG %s(%d): " fmt, __func__, __LINE__, ## __VA_ARGS__); \
} while (0)

extern int debug;
extern char *ubus_socket;
void procd_connect_ubus(void);
Expand Down

0 comments on commit 4a1bfc6

Please sign in to comment.