projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix stale vlist/avl key for instance names
[project/procd.git]
/
procd.h
diff --git
a/procd.h
b/procd.h
index
8b33143
..
6461be6
100644
(file)
--- a/
procd.h
+++ b/
procd.h
@@
-5,14
+5,21
@@
#include <libubus.h>
#include <stdio.h>
#include <libubus.h>
#include <stdio.h>
+#define __init __attribute__((constructor))
+
#define DPRINTF(fmt, ...) do { \
if (debug) \
fprintf(stderr, "DEBUG %s(%d): " fmt, __func__, __LINE__, ## __VA_ARGS__); \
} while (0)
#define DPRINTF(fmt, ...) do { \
if (debug) \
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);
extern int debug;
extern char *ubus_socket;
void procd_connect_ubus(void);
-void procd_
register_objects
(struct ubus_context *ctx);
+void procd_
init_service
(struct ubus_context *ctx);
#endif
#endif