X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;ds=sidebyside;f=src%2Fheaders%2Fdebug_op.h;fp=src%2Fheaders%2Fdebug_op.h;h=238560de8d65d1a8e63ec7dccd2ecb790f91f157;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=52b9f1873664808f31040302c46d1eac30facaf2;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b;p=ossec-hids.git diff --git a/src/headers/debug_op.h b/src/headers/debug_op.h old mode 100755 new mode 100644 index 52b9f18..238560d --- a/src/headers/debug_op.h +++ b/src/headers/debug_op.h @@ -1,6 +1,3 @@ -/* @(#) $Id: ./src/headers/debug_op.h, 2011/09/08 dcid Exp $ - */ - /* Copyright (C) 2009 Trend Micro Inc. * All right reserved. * @@ -10,58 +7,44 @@ * Foundation */ - -/* Part of the OSSEC HIDS - * Available at http://www.ossec.net +/* Functions to generate debug/verbose/err reports + * + * We have two debug levels (1 and 2), a verbose mode and an error function + * + * To see these messages, use the "-d","-v" options (or "-d" twice to see debug2) + * The merror is printed by default when an important error occurs */ -/* Functions to generate debug/verbose/err reports. - * Right now, we have two debug levels: 1,2, - * a verbose mode and a error (merror) function. - * To see these messages, use the "-d","-v" options - * (or "-d" twice to see debug2). The merror is printed - * by default when an important error occur. - * */ - #ifndef __DEBUG_H - #define __DEBUG_H #ifndef __GNUC__ #define __attribute__(x) #endif -void debug1(const char *msg,...) __attribute__((format(printf, 1, 2))); - -void debug2(const char *msg,...) __attribute__((format(printf, 1, 2))); - -void merror(const char *msg,...) __attribute__((format(printf, 1, 2))); - -void verbose(const char *msg,...) __attribute__((format(printf, 1, 2))); - -void print_out(const char *msg,...) __attribute__((format(printf, 1, 2))); - -void log2file(const char * msg,... ) __attribute__((format(printf, 1, 2))); - -void ErrorExit(const char *msg,...) __attribute__((format(printf, 1, 2))); - +void debug1(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull)); +void debug2(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull)); +void merror(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull)); +void verbose(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull)); +void print_out(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull)); +void log2file(const char *msg, ... ) __attribute__((format(printf, 1, 2))) __attribute__((nonnull)); +void ErrorExit(const char *msg, ...) __attribute__((format(printf, 1, 2))) __attribute__((nonnull)) __attribute__ ((noreturn)); /* Use these three functions to set when you * enter in debug, chroot or daemon mode */ -void nowDebug(); +void nowDebug(void); +void nowChroot(void); +void nowDaemon(void); -void nowChroot(); - -void nowDaemon(); - -int isChroot(); +int isChroot(void); /* Debug analysisd */ #ifdef DEBUGAD - #define DEBUG_MSG(x,y,z) verbose(x,y,z) +#define DEBUG_MSG(x,y,z) verbose(x,y,z) #else - #define DEBUG_MSG(x,y,z) +#define DEBUG_MSG(x,y,z) #endif /* end debug analysisd */ -#endif +#endif /* __DEBUG_H */ +