]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - spaceman/info.c
xfs_spaceman: embed struct xfs_fd in struct fileio
[thirdparty/xfsprogs-dev.git] / spaceman / info.c
index f563cf1edde148941d20c471ef4aceaf4d9ce164..f6234c4c67aa19f8b9582487d502ddf80306a9a0 100644 (file)
@@ -7,8 +7,8 @@
 #include "command.h"
 #include "init.h"
 #include "libfrog/paths.h"
-#include "space.h"
 #include "libfrog/fsgeom.h"
+#include "space.h"
 
 static void
 info_help(void)
@@ -28,26 +28,13 @@ info_f(
        int                     argc,
        char                    **argv)
 {
-       struct xfs_fsop_geom    geo;
-       int                     error;
-
        if (fs_table_lookup_mount(file->name) == NULL) {
                fprintf(stderr, _("%s: Not a XFS mount point.\n"), file->name);
                return 1;
        }
 
-       /* get the current filesystem size & geometry */
-       error = xfrog_geometry(file->fd, &geo);
-       if (error) {
-               fprintf(stderr,
-       _("%s: cannot determine geometry of filesystem mounted at %s: %s\n"),
-                       progname, file->name, strerror(error));
-               exitcode = 1;
-               return 0;
-       }
-
-       xfs_report_geom(&geo, file->fs_path.fs_name, file->fs_path.fs_log,
-                       file->fs_path.fs_rt);
+       xfs_report_geom(&file->xfd.fsgeom, file->fs_path.fs_name,
+                       file->fs_path.fs_log, file->fs_path.fs_rt);
        return 0;
 }