Date: Sat, 7 Nov 2015 23:27:03 +0000 (UTC) From: "Conrad E. Meyer" <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290520 - head/sbin/savecore Message-ID: <201511072327.tA7NR3m1023358@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Sat Nov 7 23:27:03 2015 New Revision: 290520 URL: https://svnweb.freebsd.org/changeset/base/290520 Log: savecore(8): Be quiet unless the user asks for verbose Make savecore(8) more suitable for init-time scripts; be quiet by default. Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3229 Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Sat Nov 7 23:05:23 2015 (r290519) +++ head/sbin/savecore/savecore.c Sat Nov 7 23:27:03 2015 (r290520) @@ -836,15 +836,18 @@ main(int argc, char **argv) /* Emit minimal output. */ if (nfound == 0) { if (checkfor) { - printf("No dump exists\n"); + if (verbose) + printf("No dump exists\n"); exit(1); } - syslog(LOG_WARNING, "no dumps found"); - } - else if (nsaved == 0) { - if (nerr != 0) - syslog(LOG_WARNING, "unsaved dumps found but not saved"); - else + if (verbose) + syslog(LOG_WARNING, "no dumps found"); + } else if (nsaved == 0) { + if (nerr != 0) { + if (verbose) + syslog(LOG_WARNING, "unsaved dumps found but not saved"); + exit(1); + } else if (verbose) syslog(LOG_WARNING, "no unsaved dumps found"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511072327.tA7NR3m1023358>