[haiku-commits] Change in haiku[master]: syslog.h add LOG_PRIMASK and LOG_PRI macros

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 21 Nov 2020 19:05:38 +0000

From Jérôme Duval <jerome.duval@xxxxxxxxx>:

Jérôme Duval has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/3408 ;)


Change subject: syslog.h add LOG_PRIMASK and LOG_PRI macros
......................................................................

syslog.h add LOG_PRIMASK and LOG_PRI macros
---
M headers/posix/syslog.h
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/08/3408/1

diff --git a/headers/posix/syslog.h b/headers/posix/syslog.h
index 7ec4f4c..4fbd7d5 100644
--- a/headers/posix/syslog.h
+++ b/headers/posix/syslog.h
@@ -61,6 +61,9 @@
 #define LOG_INFO               6
 #define LOG_DEBUG              7

+#define LOG_PRIMASK            (0x7)   /* mask to extract priority part */
+#define LOG_PRI(p)             ((p) & LOG_PRIMASK)
+
 /* turns a priority into a mask usable for setlogmask() */
 #define LOG_MASK(pri)  (1 << (pri))
 #define LOG_UPTO(pri)  ((1 << ((pri) + 1)) - 1)

--
To view, visit https://review.haiku-os.org/c/haiku/+/3408
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I9ae0c3165cea831e329e49211ff738cbb89a65de
Gerrit-Change-Number: 3408
Gerrit-PatchSet: 1
Gerrit-Owner: Jérôme Duval <jerome.duval@xxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: syslog.h add LOG_PRIMASK and LOG_PRI macros - Gerrit