From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id AC4AA5A0269; Wed, 26 Oct 2022 18:25:31 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 1/4] conf, passt.1: Don't imply --foreground with --debug Date: Wed, 26 Oct 2022 18:25:28 +0200 Message-Id: <20221026162531.545374-2-sbrivio@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221026162531.545374-1-sbrivio@redhat.com> References: <20221026162531.545374-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: F75B3P4OOV7IRPA67BKHVY64NSZ6LZVL X-Message-ID-Hash: F75B3P4OOV7IRPA67BKHVY64NSZ6LZVL X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Paul Holzinger X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: <> Archived-At: List-Archive: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Having -f implied by -d (and --trace) usually saves some typing, but debug mode in background (with a log file) is quite useful if pasta is started by Podman, and is probably going to be handy for passt with libvirt later, too. Signed-off-by: Stefano Brivio --- conf.c | 7 +++---- passt.1 | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/conf.c b/conf.c index 598c711..90214f5 100644 --- a/conf.c +++ b/conf.c @@ -636,7 +636,7 @@ static void usage(const char *name) info(""); - info( " -d, --debug Be verbose, don't run in background"); + info( " -d, --debug Be verbose"); info( " --trace Be extra verbose, implies --debug"); info( " -q, --quiet Don't print informational messages"); info( " -f, --foreground Don't run in background"); @@ -1192,7 +1192,7 @@ void conf(struct ctx *c, int argc, char **argv) usage(argv[0]); } - c->trace = c->debug = c->foreground = 1; + c->trace = c->debug = 1; break; case 12: if (runas) { @@ -1233,7 +1233,6 @@ void conf(struct ctx *c, int argc, char **argv) } c->debug = 1; - c->foreground = 1; break; case 'e': if (logfile) { @@ -1275,7 +1274,7 @@ void conf(struct ctx *c, int argc, char **argv) c->quiet = 1; break; case 'f': - if (c->foreground && !c->debug) { + if (c->foreground) { err("Multiple --foreground options given"); usage(argv[0]); } diff --git a/passt.1 b/passt.1 index 92c4ce2..d121050 100644 --- a/passt.1 +++ b/passt.1 @@ -79,12 +79,11 @@ for performance reasons. .TP .BR \-d ", " \-\-debug -Be verbose, don't run in background, don't log to the system logger. +Be verbose, don't log to the system logger. .TP .BR \-\-trace -Be extra verbose, show single packets, don't run in background. Implies -\fB--debug\fR. +Be extra verbose, show single packets. Implies \fB--debug\fR. .TP .BR \-q ", " \-\-quiet -- 2.35.1