X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flog.h;h=ab894df172ef724776cce154847684e681336fbb;hb=e627440b41bb0284e4892f7aa9d84c77972487e2;hp=c986b2579d7cff2f837286983cc7cadfb682ca26;hpb=c2f1db8f83618e60dcded8303d14656d7d26b436;p=elogind.git diff --git a/src/shared/log.h b/src/shared/log.h index c986b2579..ab894df17 100644 --- a/src/shared/log.h +++ b/src/shared/log.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "macro.h" @@ -102,6 +103,9 @@ int log_dump_internal( #define log_warning(...) log_meta(LOG_WARNING, __FILE__, __LINE__, __func__, __VA_ARGS__) #define log_error(...) log_meta(LOG_ERR, __FILE__, __LINE__, __func__, __VA_ARGS__) +int __log_oom(const char *file, int line, const char *func); +#define log_oom() __log_oom(__FILE__, __LINE__, __func__) + /* This modifies the buffer passed! */ #define log_dump(level, buffer) log_dump_internal(level, __FILE__, __LINE__, __func__, buffer)