[BusyBox] syslogd -p

Stuart Hughes stuarth at freescale.com
Wed Jul 6 16:42:28 UTC 2005


I would second that.  I only put the ifdefs in a half hearted attempt to 
save a few bytes.  I guess it's up to the maintainers to decided if/how 
they like it to be.

Regards, Stuart

Jason Schoon wrote:
> <Beating a Dead Horse>
> 
> I wonder if it is even worth having a config option for this feature.  
> Even if you disable it, you are not actually saving any size (other than 
> a very small amount of code size for a case statement and assignment).  
> The only real effect of the config option is to make the -p option, 
> which still exists, not do anything.
> 
> I would think either more ifdefs are needed, or the config option should 
> just be scrapped and make this an included feature.
> 
> </Beating a Dead Horse>
> 
> On 7/6/05, Stuart Hughes <stuarth at freescale.com 
> <mailto:stuarth at freescale.com>> wrote:
> 
>     Yes exactly.  The patch as originally supplied seems to work fine when
>     enabled or disabled.
> 
>     Regards, Stuart
> 
>     Jason Schoon wrote:
>      > 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
>     <mailto:stuarth at freescale.com>
>      > <mailto: stuarth at freescale.com <mailto: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 <mailto:busybox at mail.busybox.net>
>     <mailto:busybox at mail.busybox.net <mailto:busybox at mail.busybox.net>>
>      >     http://busybox.net/mailman/listinfo/busybox
>      >
>      >
>      >
> 
> 




More information about the busybox mailing list