Marty Leisner
2008-Jun-07 18:43 UTC
[syslinux] directing output of tftpd to stdout, instead of syslog()
I'm doing some work with hpda-tftpd--0.48. All output is to syslog -- this is inconvenient when running interctivitly. tftpd has a no daemonize flag -- this is not used either started it normally or from the sample inetd... I'm thinking of doing: my_syslog(int priority, const char *format, ...) { va_list ap; va_start(ap, format); if(use_tty == TRUE) vfprintf(stderr, format, ap); else vsyslog(priority, format, ap); va_end(ap); } and building with -Dsyslog=my_syslog I like the fact when the startup options are incorrect, they're logged...so I need "use_tty" set up before anything else. marty
H. Peter Anvin
2008-Jun-07 21:54 UTC
[syslinux] directing output of tftpd to stdout, instead of syslog()
Marty Leisner wrote:> > I'm thinking of doing: > > my_syslog(int priority, const char *format, ...) > { > va_list ap; > > va_start(ap, format); > > if(use_tty == TRUE) > vfprintf(stderr, format, ap); > else vsyslog(priority, format, ap); > > va_end(ap); > } > and building with -Dsyslog=my_syslog > > I like the fact when the startup options are incorrect, they're logged...so I need "use_tty" set up before anything > else. >I just don't know how far back one can assume vfprintf() or *especially* vsyslog() exists. tftp-hpa is designed to be "portable to anything vaguley Unix-like" simply because I've been trying to give people an alternative to the 1980's-era BSD code that commercial vendors have been known to still ship. -hpa
Maybe Matching Threads
- BIND9/DNS lookups stopped working after upgrading our Comcast modem/gateway
- BIND9/DNS lookups stopped working after upgrading our Comcast modem/gateway
- Windows 10 workstation won't register with DNS after Samba update
- BIND9/DNS lookups stopped working after upgrading our Comcast modem/gateway
- Compiling with SCO