]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
dmesg: open-code LOG_MAKEPRI
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 8 Dec 2023 17:10:44 +0000 (18:10 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 11 Dec 2023 11:03:44 +0000 (12:03 +0100)
LOG_MAKEPRI between musl and glibc differ in their behavior.

musl performs the '<< 3' as part of the macro while glibc expects the
caller to do so.
Just provide our own implementation to avoid the issue.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
sys-utils/dmesg.c

index f32226f0900253553cde40f5f6036f47af33d576..adc80c259020b34cfddb857ccf4ef390b6e444fe 100644 (file)
@@ -125,7 +125,7 @@ static const struct dmesg_name level_names[] =
  * shifted code :-)
  */
 #define FAC_BASE(f)    ((f) >> 3)
-#define LOG_RAW_FAC_PRI(fac, pri)      LOG_MAKEPRI((fac << 3), (pri))
+#define LOG_RAW_FAC_PRI(fac, pri)      ((fac << 3) | pri)
 
 static const struct dmesg_name facility_names[] =
 {