X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=procd.h;h=66a08e2d125f7f765f252e19fce0b988e7424030;hp=cc063b36b54a741174d4aac6c6992ecc87b8b136;hb=5baf6ea0abf218c6743a59cfc46a00318772f8fc;hpb=ca808f5c335a873c87359ce024e1a14ebae706b9 diff --git a/procd.h b/procd.h index cc063b3..66a08e2 100644 --- a/procd.h +++ b/procd.h @@ -2,15 +2,25 @@ #define __PROCD_H #include +#include +#include #include +#define __init __attribute__((constructor)) + #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); +void procd_init_service(struct ubus_context *ctx); #endif