]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - libfrog/logging.c
libfrog: convert ptvar.c functions to negative error codes
[thirdparty/xfsprogs-dev.git] / libfrog / logging.c
CommitLineData
9fc3ef62
DW
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2019 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 */
6#include <errno.h>
7#include <stdio.h>
8#include "logging.h"
9
10/* Print an error. */
11void
12xfrog_perror(
13 int error,
14 const char *s)
15{
16 errno = error < 0 ? -error : error;
17 perror(s);
18}