X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fheaders%2Fdebug_op.h;h=238560de8d65d1a8e63ec7dccd2ecb790f91f157;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=b35e73d5a757119d16348a757ca08702b242a95b;hpb=301048b51990573e58a30dc4a5bb4ec285cad554;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 b35e73d..238560d --- a/src/headers/debug_op.h +++ b/src/headers/debug_op.h @@ -1,5 +1,3 @@ -/* @(#) $Id$ */ - /* Copyright (C) 2009 Trend Micro Inc. * All right reserved. * @@ -9,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) +#ifdef DEBUGAD +#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 */ +