svn commit: r206085 - stable/7/usr.sbin/cdcontrol
Jaakko Heinonen
jh at FreeBSD.org
Fri Apr 2 08:57:39 UTC 2010
Author: jh
Date: Fri Apr 2 08:57:39 2010
New Revision: 206085
URL: http://svn.freebsd.org/changeset/base/206085
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
Modified:
stable/7/usr.sbin/cdcontrol/cdcontrol.c
Directory Properties:
stable/7/usr.sbin/cdcontrol/ (props changed)
Modified: stable/7/usr.sbin/cdcontrol/cdcontrol.c
==============================================================================
--- stable/7/usr.sbin/cdcontrol/cdcontrol.c Fri Apr 2 08:55:10 2010 (r206084)
+++ stable/7/usr.sbin/cdcontrol/cdcontrol.c Fri Apr 2 08:57:39 2010 (r206085)
@@ -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