diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2018-03-25 13:38:14 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2018-03-25 13:38:14 +0300 |
commit | 23b5ecdaf3506d8b2e8d6918ab90756104dd446a (patch) | |
tree | 3a0cd25a6e877dd5fc85df276540cc250ab6718b /winsup/cygwin/syslog.cc | |
parent | 4fe086c84f05a4fc4740faec3f613a2ea5e4b2c7 (diff) |
Cygwin: delete /dev/kmsg and thus fhandler_mailslot without substitution
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/syslog.cc')
-rw-r--r-- | winsup/cygwin/syslog.cc | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc index e753b60dd..36633a442 100644 --- a/winsup/cygwin/syslog.cc +++ b/winsup/cygwin/syslog.cc @@ -457,38 +457,6 @@ syslog (int priority, const char *message, ...) va_end (ap); } -static NO_COPY muto klog_guard; -fhandler_mailslot *dev_kmsg; - -extern "C" void -vklog (int priority, const char *message, va_list ap) -{ - /* TODO: kernel messages are under our control entirely and they should - be quick. No playing with /dev/null, but a fixed upper size for now. */ - char buf[2060]; /* 2048 + a prority */ - if (!(priority & ~LOG_PRIMASK)) - priority = LOG_KERN | LOG_PRI (priority); - __small_sprintf (buf, "<%d>", priority); - __small_vsprintf (buf + strlen (buf), message, ap); - klog_guard.init ("klog_guard")->acquire (); - if (!dev_kmsg) - dev_kmsg = (fhandler_mailslot *) build_fh_name ("/dev/kmsg"); - if (dev_kmsg && !dev_kmsg->get_handle ()) - dev_kmsg->open (O_WRONLY, 0); - if (dev_kmsg && dev_kmsg->get_handle ()) - dev_kmsg->write (buf, strlen (buf) + 1); - klog_guard.release (); -} - -extern "C" void -klog (int priority, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - vklog (priority, message, ap); - va_end (ap); -} - extern "C" void closelog (void) { |