From: Gerhard Sittig Date: Wed, 4 Jul 2018 17:55:58 +0000 (+0200) Subject: main: terminate with error when -B was specified but -P is missing X-Git-Url: http://sigrok.org/gitweb/?p=sigrok-cli.git;a=commitdiff_plain;h=eaa5c96667ae1498b184052665f4b547ab47d432 main: terminate with error when -B was specified but -P is missing This fixes bug #1180. --- diff --git a/main.c b/main.c index 2c1dcfe..02f69a2 100644 --- a/main.c +++ b/main.c @@ -224,6 +224,11 @@ int main(int argc, char **argv) goto done; #ifdef HAVE_SRD + if (opt_pd_binary && !opt_pds) { + g_critical("Option -B will not take effect in the absence of -P."); + goto done; + } + /* Set the loglevel (amount of messages to output) for libsigrokdecode. */ if (srd_log_loglevel_set(opt_loglevel) != SRD_OK) goto done;