]> git.ipfire.org Git - thirdparty/util-linux.git/blob - include/debugobj.h
Manual pages: umount.8: use "filesystem" consistently
[thirdparty/util-linux.git] / include / debugobj.h
1 #ifndef UTIL_LINUX_DEBUGOBJ_H
2 #define UTIL_LINUX_DEBUGOBJ_H
3
4 /*
5 * Include *after* debug.h and after UL_DEBUG_CURRENT_MASK define.
6 */
7
8 static inline void __attribute__ ((__format__ (__printf__, 2, 3)))
9 ul_debugobj(const void *handler, const char *mesg, ...)
10 {
11 va_list ap;
12
13 if (handler && !(UL_DEBUG_CURRENT_MASK & __UL_DEBUG_FL_NOADDR))
14 fprintf(stderr, "[%p]: ", handler);
15
16 va_start(ap, mesg);
17 vfprintf(stderr, mesg, ap);
18 va_end(ap);
19 fputc('\n', stderr);
20 }
21
22 #endif /* UTIL_LINUX_DEBUGOBJ_H */