chiark / gitweb /
udev: cdrom_id, accelerometer - enable debug output for --debug
authorKay Sievers <kay@vrfy.org>
Thu, 26 Jul 2012 10:03:25 +0000 (12:03 +0200)
committerKay Sievers <kay@vrfy.org>
Thu, 26 Jul 2012 10:03:25 +0000 (12:03 +0200)
src/udev/accelerometer/accelerometer.c
src/udev/cdrom_id/cdrom_id.c

index 08be363..b8ed7b8 100644 (file)
@@ -277,8 +277,8 @@ int main (int argc, char** argv)
                 switch (option) {
                 case 'd':
                         debug = 1;
-                        if (udev_get_log_priority(udev) < LOG_INFO)
-                                udev_set_log_priority(udev, LOG_INFO);
+                        log_set_max_level(LOG_DEBUG);
+                        udev_set_log_priority(udev, LOG_DEBUG);
                         break;
                 case 'h':
                         help();
index 74c5165..870dfc8 100644 (file)
@@ -902,8 +902,8 @@ int main(int argc, char *argv[])
                         break;
                 case 'd':
                         debug = true;
-                        if (udev_get_log_priority(udev) < LOG_INFO)
-                                udev_set_log_priority(udev, LOG_INFO);
+                        log_set_max_level(LOG_DEBUG);
+                        udev_set_log_priority(udev, LOG_DEBUG);
                         break;
                 case 'h':
                         printf("Usage: cdrom_id [options] <device>\n"