Blame src/topology/log.c

Packit Service db8eaa
/*
Packit Service db8eaa
  Copyright (c) 2019 Red Hat Inc.
Packit Service db8eaa
  All rights reserved.
Packit Service db8eaa
Packit Service db8eaa
  This library is free software; you can redistribute it and/or modify
Packit Service db8eaa
  it under the terms of the GNU Lesser General Public License as
Packit Service db8eaa
  published by the Free Software Foundation; either version 2.1 of
Packit Service db8eaa
  the License, or (at your option) any later version.
Packit Service db8eaa
Packit Service db8eaa
  This program is distributed in the hope that it will be useful,
Packit Service db8eaa
  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service db8eaa
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service db8eaa
  GNU Lesser General Public License for more details.
Packit Service db8eaa
Packit Service db8eaa
  Authors: Jaroslav Kysela <perex@perex.cz>
Packit Service db8eaa
*/
Packit Service db8eaa
Packit Service db8eaa
#include "list.h"
Packit Service db8eaa
#include "tplg_local.h"
Packit Service db8eaa
Packit Service db8eaa
/* verbose output detailing each object size and file position */
Packit Service db8eaa
void tplg_log_(snd_tplg_t *tplg, char type, size_t pos, const char *fmt, ...)
Packit Service db8eaa
{
Packit Service db8eaa
	va_list va;
Packit Service db8eaa
Packit Service db8eaa
	if (!tplg->verbose)
Packit Service db8eaa
		return;
Packit Service db8eaa
Packit Service db8eaa
	va_start(va, fmt);
Packit Service db8eaa
	fprintf(stdout, "%c0x%6.6zx/%6.6zd - ", type, pos, pos);
Packit Service db8eaa
	vfprintf(stdout, fmt, va);
Packit Service db8eaa
	va_end(va);
Packit Service db8eaa
	putc('\n', stdout);
Packit Service db8eaa
}