Blame dmioutput.c

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