Blame src/topology/log.c

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