1d5ac70f0Sopenharmony_ci/*
2d5ac70f0Sopenharmony_ci  Copyright (c) 2019 Red Hat Inc.
3d5ac70f0Sopenharmony_ci  All rights reserved.
4d5ac70f0Sopenharmony_ci
5d5ac70f0Sopenharmony_ci  This library is free software; you can redistribute it and/or modify
6d5ac70f0Sopenharmony_ci  it under the terms of the GNU Lesser General Public License as
7d5ac70f0Sopenharmony_ci  published by the Free Software Foundation; either version 2.1 of
8d5ac70f0Sopenharmony_ci  the License, or (at your option) any later version.
9d5ac70f0Sopenharmony_ci
10d5ac70f0Sopenharmony_ci  This program is distributed in the hope that it will be useful,
11d5ac70f0Sopenharmony_ci  but WITHOUT ANY WARRANTY; without even the implied warranty of
12d5ac70f0Sopenharmony_ci  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13d5ac70f0Sopenharmony_ci  GNU Lesser General Public License for more details.
14d5ac70f0Sopenharmony_ci
15d5ac70f0Sopenharmony_ci  Authors: Jaroslav Kysela <perex@perex.cz>
16d5ac70f0Sopenharmony_ci*/
17d5ac70f0Sopenharmony_ci
18d5ac70f0Sopenharmony_ci#include "tplg_local.h"
19d5ac70f0Sopenharmony_ci
20d5ac70f0Sopenharmony_ci/* verbose output detailing each object size and file position */
21d5ac70f0Sopenharmony_civoid tplg_log_(snd_tplg_t *tplg, char type, size_t pos, const char *fmt, ...)
22d5ac70f0Sopenharmony_ci{
23d5ac70f0Sopenharmony_ci	va_list va;
24d5ac70f0Sopenharmony_ci
25d5ac70f0Sopenharmony_ci	if (!tplg->verbose)
26d5ac70f0Sopenharmony_ci		return;
27d5ac70f0Sopenharmony_ci
28d5ac70f0Sopenharmony_ci	va_start(va, fmt);
29d5ac70f0Sopenharmony_ci	fprintf(stdout, "%c0x%6.6zx/%6.6zd - ", type, pos, pos);
30d5ac70f0Sopenharmony_ci	vfprintf(stdout, fmt, va);
31d5ac70f0Sopenharmony_ci	va_end(va);
32d5ac70f0Sopenharmony_ci	putc('\n', stdout);
33d5ac70f0Sopenharmony_ci}
34