From 84173ff9e37e6395bba2419e60e56f7df95e3aca Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 27 Jan 2022 13:03:36 +0100 Subject: [PATCH] topology: don't allow to mix verbose level and output to stdout Fixes: https://github.com/alsa-project/alsa-utils/issues/131 Signed-off-by: Jaroslav Kysela --- topology/topology.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/topology/topology.c b/topology/topology.c index e172dd6..3fac068 100644 --- a/topology/topology.c +++ b/topology/topology.c @@ -486,6 +486,12 @@ int main(int argc, char *argv[]) return 1; } + if ((cflags & SND_TPLG_CREATE_VERBOSE) != 0 && + output_file && strcmp(output_file, "-") == 0) { + fprintf(stderr, _("Invalid mix of verbose level and output to stdout.\n")); + return 1; + } + if (op == 'n') { if (sflags != 0 && sflags != SND_TPLG_SAVE_SORT) { fprintf(stderr, _("Wrong parameters for the normalize operation!\n")); -- 2.47.1