diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-03-27 17:59:22 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-03-27 17:59:22 +0200 |
commit | b5e694267142042228a6cac99ecad6c4b4ef8759 (patch) | |
tree | 139b842ae9982dd14b649cf84346795c8cf5db8d /extras/volume_id/libvolume_id/util.h | |
parent | 727f3fb091cf4903e9e9aa21159f05c36aaede24 (diff) |
volume_id: provide a custom debug function
Diffstat (limited to 'extras/volume_id/libvolume_id/util.h')
-rw-r--r-- | extras/volume_id/libvolume_id/util.h | 11 |
1 files changed, 10 insertions, 1 deletions
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 <kay.sievers@vrfy.org> + * Copyright (C) 2005-2006 Kay Sievers <kay.sievers@vrfy.org> * * 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 <endian.h> #include <byteswap.h> +#include <syslog.h> + +#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 |