[BusyBox] syslogd -p

Jason Schoon floydpink at gmail.com
Wed Jul 6 08:15:20 MDT 2005


Wouldn't that be exactly the desired behavior? If you haven't enabled the 
feature, and you try to use that command switch, it gives a usage error?

On 7/6/05, Stuart Hughes <stuarth at freescale.com> wrote:
> 
> Bernhard Fischer wrote:
> > On Tue, Jul 05, 2005 at 05:11:29PM +0100, Stuart Hughes wrote:
> >
> >>I've attached a patch against busybox-1.00 that implements this.
> >>
> >>Regards, Stuart
> >>
> >
> >
> >>diff --exclude CVS -uNr busybox-1.00/sysklogd/syslogd.c 
> busybox-1.00.modified/sysklogd/syslogd.c
> >>--- busybox-1.00/sysklogd/syslogd.c 2004-09-14 19:12:13.000000000 +0100
> >>+++ busybox-1.00.modified/sysklogd/syslogd.c 2005-07-05 17:05:
> 44.000000000 +0100
> >>@@ -623,7 +623,7 @@
> >> char *p;
> >>
> >> /* do normal option parsing */
> >>- while ((opt = getopt(argc, argv, "m:nO:s:Sb:R:LC::")) > 0) {
> >>+ while ((opt = getopt(argc, argv, "m:nO:s:p:Sb:R:LC::")) > 0) {
> >
> >
> > This looks like it would permit p: even if
> > CONFIG_FEATURE_SYSLOG_SOCKET_FILE wasn't set.
> >
> > I'd
> > #define OPT_p "p:"
> > conditionally..
> >
> >
> 
> Hi Bernhard,
> 
> Although the string would allow this in getopt, the #ifdef in the case
> statement means it falls through to the usage message if you try and
> CONFIG_FEATURE_SYSLOG_SOCKET_FILE is not defined.
> 
> I looked at the other options that have conditionals and they're done in
> this way, so I thought I'd stay with the existing style.
> 
> Regards, Stuart
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
> 
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/busybox/attachments/20050706/eed1c7c5/attachment.html


More information about the busybox mailing list