From: Jaroslav Kysela Date: Thu, 27 Jan 2022 12:03:36 +0000 (+0100) Subject: topology: don't allow to mix verbose level and output to stdout X-Git-Tag: v1.2.7~37 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=84173ff9e37e6395bba2419e60e56f7df95e3aca;p=alsa-utils.git 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 --- 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"));