#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"
static cmdinfo_t fsmap_cmd;
static dev_t xfs_data_dev;
NFLG+1, NFLG+1, FLG_ESW);
}
-int
+static int
fsmap_f(
int argc,
char **argv)
}
if (vflag) {
- c = ioctl(file->fd, XFS_IOC_FSGEOMETRY, &fsgeo);
- if (c < 0) {
+ 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;
}