extern int libmount_debug_mask;
-static inline void mnt_debug(const char *mesg, ...)
+static inline void __attribute__ ((__format__ (__printf__, 1, 2)))
+mnt_debug(const char *mesg, ...)
{
va_list ap;
va_start(ap, mesg);
fputc('\n', stderr);
}
-static inline void mnt_debug_h(void *handler, const char *mesg, ...)
+static inline void __attribute__ ((__format__ (__printf__, 2, 3)))
+mnt_debug_h(void *handler, const char *mesg, ...)
{
va_list ap;
free(*optstr);
*optstr = tmp;
- DBG(OPTIONS, mnt_debug("failed to prepend '%s[=%s]' to '%s'", name, value, optstr));
+ DBG(OPTIONS, mnt_debug("failed to prepend '%s[=%s]' to '%s'",
+ name, value, *optstr));
return rc;
}
if (!tb || !root)
return -EINVAL;
- DBG(TAB, mnt_debug_h(tb, "lookup root fs", tb));
+ DBG(TAB, mnt_debug_h(tb, "lookup root fs"));
mnt_reset_iter(&itr, MNT_ITER_FORWARD);
while(mnt_tab_next_fs(tb, &itr, &fs) == 0) {
if (!tb || !itr || !fs || !match_func)
return -EINVAL;
- DBG(TAB, mnt_debug_h(tb, "lookup next fs", tb));
+ DBG(TAB, mnt_debug_h(tb, "lookup next fs"));
if (!itr->head)
MNT_ITER_INIT(itr, &tb->ents);
*/
return 0;
err:
- DBG(TAB, mnt_debug_h(tb, "%s:%d: parse error", tb, filename, *nlines));
+ DBG(TAB, mnt_debug_h(tb, "%s:%d: parse error", filename, *nlines));
rc = 1; /* recoverable error */