svn commit: r199194 - stable/8/usr.sbin/cdcontrol
Jaakko Heinonen
jh at FreeBSD.org
Wed Nov 11 19:50:52 UTC 2009
Author: jh
Date: Wed Nov 11 19:50:52 2009
New Revision: 199194
URL: http://svn.freebsd.org/changeset/base/199194
Log:
MFC r197833:
When run() returns an error, print the error message also in
non-interactive mode. Previously error messages were printed only in
interactive mode.
PR: bin/124517
Approved by: trasz (mentor)
Modified:
stable/8/usr.sbin/cdcontrol/cdcontrol.c
Directory Properties:
stable/8/usr.sbin/cdcontrol/ (props changed)
Modified: stable/8/usr.sbin/cdcontrol/cdcontrol.c
==============================================================================
--- stable/8/usr.sbin/cdcontrol/cdcontrol.c Wed Nov 11 19:39:45 2009 (r199193)
+++ stable/8/usr.sbin/cdcontrol/cdcontrol.c Wed Nov 11 19:50:52 2009 (r199194)
@@ -241,7 +241,7 @@ int main (int argc, char **argv)
if (argc > 0) {
char buf[80], *p;
- int len;
+ int len, rc;
for (p=buf; argc-->0; ++argv) {
len = strlen (*argv);
@@ -257,7 +257,11 @@ int main (int argc, char **argv)
}
*p = 0;
arg = parse (buf, &cmd);
- return (run (cmd, arg));
+ rc = run (cmd, arg);
+ if (rc < 0 && verbose)
+ warn(NULL);
+
+ return (rc);
}
if (verbose == 1)
More information about the svn-src-stable
mailing list