From b5e694267142042228a6cac99ecad6c4b4ef8759 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Mon, 27 Mar 2006 17:59:22 +0200 Subject: volume_id: provide a custom debug function --- extras/volume_id/libvolume_id/util.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'extras/volume_id/libvolume_id/util.h') diff --git a/extras/volume_id/libvolume_id/util.h b/extras/volume_id/libvolume_id/util.h index 8cb1abd360..1d1b53bb57 100644 --- a/extras/volume_id/libvolume_id/util.h +++ b/extras/volume_id/libvolume_id/util.h @@ -1,7 +1,7 @@ /* * volume_id - reads filesystem label and uuid * - * Copyright (C) 2005 Kay Sievers + * Copyright (C) 2005-2006 Kay Sievers * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -21,6 +21,15 @@ #include #include +#include + +#define err(format, arg...) volume_id_log(LOG_ERR, __FILE__, __LINE__, format, ##arg) +#define info(format, arg...) volume_id_log(LOG_INFO, __FILE__, __LINE__, format, ##arg) +#ifdef DEBUG +#define dbg(format, arg...) volume_id_log(LOG_DEBUG, __FILE__, __LINE__, format, ##arg) +#else +#define dbg(format, arg...) do { } while (0) +#endif /* size of superblock buffer, reiserfs block is at 64k */ #define SB_BUFFER_SIZE 0x11000 -- cgit v1.2.3-54-g00ecf