Bug 230 - make nsd-* use stdout for non-error output
make nsd-* use stdout for non-error output
Product: NSD
Classification: Unclassified
Component: Zonec Code
Other All
: P2 enhancement
Assigned To: NSD team
Depends on:
  Show dependency treegraph
Reported: 2009-01-18 15:38 CET by Tom Hendrikx
Modified: 2009-01-19 15:16 CET (History)
1 user (show)

See Also:

zonec-use-stdout.patch (4.03 KB, patch)
2009-01-18 15:38 CET, Tom Hendrikx
Details | Diff
nsd-use-stdout.patch (15.23 KB, patch)
2009-01-18 17:40 CET, Tom Hendrikx
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hendrikx 2009-01-18 15:38:05 CET
Created attachment 94 [details]

Suppressing output from nsdc works fine most of the time with `nsdc (command) > /dev/null`, however output from zonec is sent to stderr, also for informational messages.
Attached a patch to make zonec use stderr for error messages, and stdout for the rest.
Comment 1 Tom Hendrikx 2009-01-18 17:40:01 CET
Created attachment 95 [details]

skimmed through some other source files too:

$ svn st
M      nsd.c
M      nsd-patch.c
M      nsd-xfer.c
M      nsd-notify.c
M      nsd-checkconf.c
M      zonec.c
Comment 2 Matthijs Mekking 2009-01-19 15:16:12 CET
Hi Tom, 

Thanks for your patch.
I applied it, with the exception of the fprintf's in usage and version functions: The usage function may be called when a commandline error occurs. Since it might not be the expected behavior, the usage messages is printed to stderr. The same argument can be used for version.

I hope this is sufficient output suppressing.