summaryrefslogtreecommitdiff
path: root/extras/volume_id/vol_id.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/volume_id/vol_id.c')
-rw-r--r--extras/volume_id/vol_id.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c
index 2274550c19..dcf56d87e9 100644
--- a/extras/volume_id/vol_id.c
+++ b/extras/volume_id/vol_id.c
@@ -63,10 +63,13 @@ void log_message(int priority, const char *format, ...)
static void vid_log(int priority, const char *file, int line, const char *format, ...)
{
#ifdef USE_LOG
+ char log_str[1024];
va_list args;
va_start(args, format);
- log_message(priority, format, args);
+ vsnprintf(log_str, sizeof(log_str), format, args);
+ log_str[sizeof(log_str)-1] = '\0';
+ log_message(priority, "%s:%i %s", file, line, log_str);
va_end(args);
#endif
return;