]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - io/fsmap.c
libfrog: convert fsgeom.c functions to negative error codes
[thirdparty/xfsprogs-dev.git] / io / fsmap.c
index e91ffc3684561c6bb0a9e601d99194ad162a95dc..feacb264a9d0755968e3ded9f9eab772c49e6059 100644 (file)
@@ -6,7 +6,7 @@
 #include "platform_defs.h"
 #include "command.h"
 #include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
 #include "io.h"
 #include "input.h"
 #include "libfrog/fsgeom.h"
@@ -448,11 +448,11 @@ fsmap_f(
        }
 
        if (vflag) {
-               c = xfrog_geometry(file->fd, &fsgeo);
+               c = -xfrog_geometry(file->fd, &fsgeo);
                if (c) {
                        fprintf(stderr,
                                _("%s: can't get geometry [\"%s\"]: %s\n"),
-                               progname, file->name, strerror(errno));
+                               progname, file->name, strerror(c));
                        exitcode = 1;
                        return 0;
                }