Blame dmioutput.c

Packit Service b671d8
/*
Packit Service b671d8
 * Generic output functions
Packit Service b671d8
 * This file is part of the dmidecode project.
Packit Service b671d8
 *
Packit Service b671d8
 *   Copyright (C) 2020 Jean Delvare <jdelvare@suse.de>
Packit Service b671d8
 *
Packit Service b671d8
 *   This program is free software; you can redistribute it and/or modify
Packit Service b671d8
 *   it under the terms of the GNU General Public License as published by
Packit Service b671d8
 *   the Free Software Foundation; either version 2 of the License, or
Packit Service b671d8
 *   (at your option) any later version.
Packit Service b671d8
 *
Packit Service b671d8
 *   This program is distributed in the hope that it will be useful,
Packit Service b671d8
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service b671d8
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service b671d8
 *   GNU General Public License for more details.
Packit Service b671d8
 *
Packit Service b671d8
 *   You should have received a copy of the GNU General Public License
Packit Service b671d8
 *   along with this program; if not, write to the Free Software
Packit Service b671d8
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
Packit Service b671d8
 */
Packit Service b671d8
Packit Service b671d8
#include <stdarg.h>
Packit Service b671d8
#include <stdio.h>
Packit Service b671d8
#include "dmioutput.h"
Packit Service b671d8
Packit Service b671d8
void pr_comment(const char *format, ...)
Packit Service b671d8
{
Packit Service b671d8
	va_list args;
Packit Service b671d8
Packit Service b671d8
	printf("# ");
Packit Service b671d8
	va_start(args, format);
Packit Service b671d8
	vprintf(format, args);
Packit Service b671d8
	va_end(args);
Packit Service b671d8
	printf("\n");
Packit Service b671d8
}
Packit Service 8ba4c5
Packit Service 8ba4c5
void pr_info(const char *format, ...)
Packit Service 8ba4c5
{
Packit Service 8ba4c5
	va_list args;
Packit Service 8ba4c5
Packit Service 8ba4c5
	va_start(args, format);
Packit Service 8ba4c5
	vprintf(format, args);
Packit Service 8ba4c5
	va_end(args);
Packit Service 8ba4c5
	printf("\n");
Packit Service 8ba4c5
}
Packit Service 1d15be
Packit Service 1d15be
void pr_handle(const struct dmi_header *h)
Packit Service 1d15be
{
Packit Service 1d15be
	printf("Handle 0x%04X, DMI type %d, %d bytes\n",
Packit Service 1d15be
	       h->handle, h->type, h->length);
Packit Service 1d15be
}
Packit Service a1ff7a
Packit Service a1ff7a
void pr_handle_name(const char *format, ...)
Packit Service a1ff7a
{
Packit Service a1ff7a
	va_list args;
Packit Service a1ff7a
Packit Service a1ff7a
	va_start(args, format);
Packit Service a1ff7a
	vprintf(format, args);
Packit Service a1ff7a
	va_end(args);
Packit Service a1ff7a
	printf("\n");
Packit Service a1ff7a
}