summaryrefslogblamecommitdiffstats
path: root/libsyscalls_perror.c
blob: f4f3a0c475c48ec7cb2f35de3fc44b8742719c67 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13


                                                         









                                                                    
/* See LICENSE file for copyright and license details. */
#include "common.h"


void
libsyscalls_perror(const char *prefix, enum libsyscalls_error error)
{
	const char *str = libsyscalls_strerror(error);
	if (prefix && *prefix)
		fprintf(stderr, "%s: %s\n", prefix, str);
	else
		fprintf(stderr, "%s\n", str);
}