[Spread-users] [PATCH] Correct names of spmonitor, spuser, and spflooder binaries in usage output

Daniel L. Rall dlr at finemaltcoding.com
Tue Apr 13 22:38:33 EDT 2004


Currently, the binaries neglect to include the "sp" prefix recently introduced 
at the beginning of their names when referencing themselves in commandline 
feedback.  Here's an example using spmonitor:

Usage: monitor
         [-p <port number>]: specify port number
         [-n <proc name>]  : force computer name
         [-t <status timeout>]: specify number of seconds between status queries
         [-c <file name>]  : specify configuration file


Attached is a patch adding the new "sp" prefix.  Here's the associated change 
log message:

* daemon/flooder.c
* daemon/monitor.c
* daemon/user.c
   Include "sp" prefix on binary names when outputing usage information.


Now, the Right Way to do this is to either 1) parse the binary name off of 
argv[0] or 2) generate a #define via autoconf which sets the binary name.  A 
combined approach of #1 with a fallback to #2 is probably preferable.

Thanks, Dan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
Url: http://lists.spread.org/pipermail/spread-users/attachments/20040413/2c8a7fd6/attachment.pl 


More information about the Spread-users mailing list