]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - io/stat.c
libfrog: print library errors
[thirdparty/xfsprogs-dev.git] / io / stat.c
index 6c666146e6b24cb78e44f869c09152f77e3ee2ea..db3357805499b6d14d23f08b10657757841dad40 100644 (file)
--- a/io/stat.c
+++ b/io/stat.c
@@ -12,6 +12,7 @@
 #include "io.h"
 #include "statx.h"
 #include "libxfs.h"
+#include "libfrog/logging.h"
 #include "libfrog/fsgeom.h"
 
 #include <fcntl.h>
@@ -198,8 +199,7 @@ statfs_f(
                return 0;
        ret = xfrog_geometry(file->fd, &fsgeo);
        if (ret) {
-               errno = ret;
-               perror("XFS_IOC_FSGEOMETRY");
+               xfrog_perror(ret, "XFS_IOC_FSGEOMETRY");
        } else {
                printf(_("geom.bsize = %u\n"), fsgeo.blocksize);
                printf(_("geom.agcount = %u\n"), fsgeo.agcount);