diff options
Diffstat (limited to 'extras/volume_id/vol_id.c')
-rw-r--r-- | extras/volume_id/vol_id.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c index 518962c10b..b086b3710c 100644 --- a/extras/volume_id/vol_id.c +++ b/extras/volume_id/vol_id.c @@ -60,6 +60,18 @@ void log_message(int priority, const char *format, ...) } #endif +static void vid_log(int priority, const char *file, int line, const char *format, ...) +{ +#ifdef USE_LOG + va_list args; + + va_start(args, format); + log_message(priority, format, args); + va_end(args); +#endif + return; +} + static void set_str(char *to, const char *from, size_t count) { size_t i, j, len; @@ -117,6 +129,9 @@ int main(int argc, char *argv[]) logging_init("vol_id"); + /* hook in our debug into libvolume_id */ + volume_id_log = vid_log; + for (i = 1 ; i < argc; i++) { char *arg = argv[i]; |