]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - libfrog/logging.c
xfs: fix maxicount division by zero error
[thirdparty/xfsprogs-dev.git] / libfrog / logging.c
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. */
11 void
12 xfrog_perror(
13 int error,
14 const char *s)
15 {
16 errno = error < 0 ? -error : error;
17 perror(s);
18 }