From: Bert Vermeulen Date: Mon, 9 Jan 2012 11:54:03 +0000 (+0100) Subject: cli: make libsigrokdecode follow loglevel setting X-Git-Tag: sigrok-cli-0.3.0~73 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6de7ec06e266e8c075708b560584e7fcab1e0b91;p=sigrok-cli.git cli: make libsigrokdecode follow loglevel setting --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 1d5d61c..07dacfe 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -953,6 +953,13 @@ int main(int argc, char **argv) return 1; } + /* Set the loglevel (amount of messages to output) for libsigrokdecode. */ + if (srd_set_loglevel(opt_loglevel) != SRD_OK) { + fprintf(stderr, "cli: %s: srd_set_loglevel(%d) failed\n", + __func__, opt_loglevel); + return 1; + } + if (sr_init() != SR_OK) return 1;