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














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

#include <stdio.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);
}