From 468d206524179c738601cd9b39079aaf6356bc4c Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 3 Jan 2013 16:12:48 +0000 Subject: [PATCH] Have -n imply -r, since dry-run mode obviously doesn't require root privileges. Approved by: rstone (co-mentor) MFC after: 1 week --- usr.sbin/newsyslog/newsyslog.8 | 4 +++- usr.sbin/newsyslog/newsyslog.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/newsyslog/newsyslog.8 b/usr.sbin/newsyslog/newsyslog.8 index 82fe5b794658..87f60ac46f5b 100644 --- a/usr.sbin/newsyslog/newsyslog.8 +++ b/usr.sbin/newsyslog/newsyslog.8 @@ -125,7 +125,9 @@ reasons for either trimming that log or skipping it. Cause .Nm not to trim the logs, but to print out what it would do if this option -were not specified. +were not specified. This option implies the +.Fl r +option. .It Fl r Remove the restriction that .Nm diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 654021f471ab..ee90b99ec1a3 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -644,7 +644,7 @@ parse_args(int argc, char **argv) break; case 'n': noaction++; - break; + /* FALLTHROUGH */ case 'r': needroot = 0; break;