+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
* All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libxfs.h"
+#include "libfrog/fsgeom.h"
int rtcp(char *, char *, int);
int xfsrtextsize(char *path);
-int pflag;
+static int pflag;
char *progname;
-void
+static void
usage(void)
{
fprintf(stderr, _("%s [-e extsize] [-p] [-V] source target\n"), progname);
int
xfsrtextsize( char *path)
{
- int fd, rval, rtextsize;
- xfs_fsop_geom_v1_t geo;
+ struct xfs_fsop_geom geo;
+ int fd, rval, rtextsize;
fd = open( path, O_RDONLY );
if ( fd < 0 ) {
progname, path, strerror(errno));
return -1;
}
- rval = xfsctl( path, fd, XFS_IOC_FSGEOMETRY_V1, &geo );
+ rval = -xfrog_geometry(fd, &geo);
close(fd);
- if ( rval < 0 )
+ if (rval)
return -1;
rtextsize = geo.rtextsize * geo.blocksize;