[rtems commit] telnetd: Use syslog() instead of printk()
Sebastian Huber
sebh at rtems.org
Wed May 2 08:00:35 UTC 2018
Module: rtems
Branch: master
Commit: 8d52a0e246951e96d27de25b03c056caa65d1a3c
Changeset: http://git.rtems.org/rtems/commit/?id=8d52a0e246951e96d27de25b03c056caa65d1a3c
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Apr 30 11:05:36 2018 +0200
telnetd: Use syslog() instead of printk()
Update #3419.
---
cpukit/telnetd/pty.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/cpukit/telnetd/pty.c b/cpukit/telnetd/pty.c
index d41de97..14d6880 100644
--- a/cpukit/telnetd/pty.c
+++ b/cpukit/telnetd/pty.c
@@ -42,6 +42,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <syslog.h>
#include <unistd.h>
/*-----------------------------------------*/
#define IAC_ESC 255
@@ -453,8 +454,13 @@ rtems_device_driver my_pty_initialize(
chmod(telnet_ptys[ndx].devname,0660);
chown(telnet_ptys[ndx].devname,2,0); /* tty,root*/
};
- printk("Device: /dev/pty%X../dev/pty%X (%d)pseudo-terminals registered.\n",
- 0,rtems_telnetd_maximum_ptys-1,rtems_telnetd_maximum_ptys);
+ syslog(
+ LOG_KERN | LOG_INFO,
+ "/dev/pty%X../dev/pty%X (%d) pseudo-terminals registered.\n",
+ 0,
+ rtems_telnetd_maximum_ptys - 1,
+ rtems_telnetd_maximum_ptys
+ );
return RTEMS_SUCCESSFUL;
}
More information about the vc
mailing list