telnetd: Use syslog() instead of printk()

This commit is contained in:
Sebastian Huber 2016-04-28 10:29:55 +02:00
parent 533808975e
commit e58b898d69

View File

@ -41,6 +41,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <syslog.h>
#include <unistd.h> #include <unistd.h>
/*-----------------------------------------*/ /*-----------------------------------------*/
#define IAC_ESC 255 #define IAC_ESC 255
@ -452,8 +453,13 @@ rtems_device_driver my_pty_initialize(
chmod(telnet_ptys[ndx].devname,0660); chmod(telnet_ptys[ndx].devname,0660);
chown(telnet_ptys[ndx].devname,2,0); /* tty,root*/ chown(telnet_ptys[ndx].devname,2,0); /* tty,root*/
}; };
printk("Device: /dev/pty%X../dev/pty%X (%d)pseudo-terminals registered.\n", syslog(
0,rtems_telnetd_maximum_ptys-1,rtems_telnetd_maximum_ptys); 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; return RTEMS_SUCCESSFUL;
} }