]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
plymouth: Add line numbers to tracing output
authorJeff Mahoney <jeffm@suse.com>
Mon, 15 Apr 2013 04:27:16 +0000 (01:27 -0300)
committerRay Strode <rstrode@redhat.com>
Tue, 16 Apr 2013 12:48:40 +0000 (08:48 -0400)
 The plymouth tracing output lists the function but there are many
 cases in which the same message is issued from multiple places in the same
 function, which makes debugging more difficult. This patch adds the line
 number to the output to uniquely identify each site.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
src/libply/ply-logger.h

index 36fe7d1accd61c19af3c75bdf0c77dd7472b9639..596bed53ea11fb0a84d6d82ce7bd09070f5b4c28 100644 (file)
@@ -91,8 +91,8 @@ do                                                                             \
         ply_logger_flush (logger);                                             \
         errno = _old_errno;                                                    \
         ply_logger_inject (logger,                                             \
-                           "[%s] %45.45s:" format "\r\n",                      \
-                           __FILE__, __func__, ##args);                        \
+                           "[%s:%d] %45.45s:" format "\r\n",                   \
+                           __FILE__, __LINE__, __func__, ##args);              \
         ply_logger_flush (logger);                                             \
         errno = _old_errno;                                                    \
       }                                                                        \