]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - include/debugobj.h
2 * SPDX-License-Identifier: LGPL-2.1-or-later
4 * Copyright (C) 2014 Ondrej Oprala <ooprala@redhat.com>
5 * Copyright (C) 2014 Karel Zak <kzak@redhat.com>
7 * This file may be distributed under the terms of the
8 * GNU Lesser General Public License.
10 #ifndef UTIL_LINUX_DEBUGOBJ_H
11 #define UTIL_LINUX_DEBUGOBJ_H
14 * Include *after* debug.h and after UL_DEBUG_CURRENT_MASK define.
17 static inline void __attribute__ ((__format__ (__printf__
, 2, 3)))
18 ul_debugobj(const void *handler
, const char *mesg
, ...)
22 if (handler
&& !(UL_DEBUG_CURRENT_MASK
& __UL_DEBUG_FL_NOADDR
))
23 fprintf(stderr
, "[%p]: ", handler
);
26 vfprintf(stderr
, mesg
, ap
);
31 #endif /* UTIL_LINUX_DEBUGOBJ_H */