]> git.alsa-project.org Git - alsa-utils.git/commitdiff
topology: don't allow to mix verbose level and output to stdout
authorJaroslav Kysela <perex@perex.cz>
Thu, 27 Jan 2022 12:03:36 +0000 (13:03 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 27 Jan 2022 12:04:01 +0000 (13:04 +0100)
Fixes: https://github.com/alsa-project/alsa-utils/issues/131
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
topology/topology.c

index e172dd6e224b5ba0b5aed087aca090dccbd29029..3fac068c7bcfc00c3c2340d92b07a8403a5ce9bc 100644 (file)
@@ -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"));