realclean distclean: clean
rm -f $(LDIRT) $(CONFIGURE)
+ rm -rf autom4te.cache
[ ! -d Logs ] || rmdir Logs
# This file is used by configure to get version information
#
PKG_MAJOR=2
-PKG_MINOR=2
-PKG_REVISION=3
+PKG_MINOR=3
+PKG_REVISION=0
PKG_BUILD=0
struct getbmapx *map;
int map_size;
int loop = 0;
- xfs_fsop_geom_t fsgeo;
+ xfs_fsop_geom_v1_t fsgeo;
fd = open(fname, O_RDONLY);
if (fd < 0) {
}
if (vflag) {
- if (ioctl(fd, XFS_IOC_FSGEOMETRY, &fsgeo) < 0) {
+ if (ioctl(fd, XFS_IOC_FSGEOMETRY_V1, &fsgeo) < 0) {
fprintf(stderr, "%s: can't get geometry [\"%s\"]: %s\n",
progname, fname, strerror(errno));
close(fd);
+xfsprogs (2.3.0-1) unstable; urgency=low
+
+ * New upstream release
+ * Improve backwards compatibility of tools using the XFS geometry
+ ioctl for older kernel versions which don't support the new ioctl
+
+ -- Nathan Scott <nathans@debian.org> Tue, 3 Sep 2002 09:55:48 +1000
+
xfsprogs (2.2.1-1) unstable; urgency=low
* New upstream release
+xfsprogs-2.3.0 (03 September 2002)
+ - Several changes to geometry ioctl callers which will make
+ the tools useable on older kernel versions too.
+ - Mainly affects xfs_bmap and xfs_growfs.
+ - Do some additional cleanup after autoconf has run.
+
xfsprogs-2.2.3 (28 August 2002)
- Update libdisk for a few other filesystems.
- Fix call to lvdisplay on LVM volumes so that lvdisplay
/* get the current filesystem size & geometry */
if (ioctl(ffd, XFS_IOC_FSGEOMETRY, &geo) < 0) {
- fprintf(stderr, "%s: cannot determine geometry of filesystem"
- " mounted at %s: %s\n",
- progname, fname, strerror(errno));
- exit(1);
+ /*
+ * OK, new ioctl barfed - back off and try earlier version
+ * as we're probably running an older kernel version.
+ * Only field added in the v2 geometry ioctl is "logsunit"
+ * so we'll zero that out for later display (as zero).
+ */
+ geo.logsunit = 1; /* 1 BB */
+ if (ioctl(ffd, XFS_IOC_FSGEOMETRY_V1, &geo) < 0) {
+ fprintf(stderr,
+ "%s: cannot determine geometry of filesystem"
+ " mounted at %s: %s\n",
+ progname, fname, strerror(errno));
+ exit(1);
+ }
}
isint = geo.logstart > 0;
unwritten = geo.flags & XFS_FSOP_GEOM_FLAGS_EXTFLG ? 1 : 0;
}
}
- if (ioctl(ffd, XFS_IOC_FSGEOMETRY, &ngeo) < 0) {
+ if (ioctl(ffd, XFS_IOC_FSGEOMETRY_V1, &ngeo) < 0) {
fprintf(stderr, "%s: ioctl failed - XFS_IOC_FSGEOMETRY: %s\n",
progname, strerror(errno));
exit(1);
}
/* if lsu or lsunit was specified, automatically use v2 logs */
- if (lsu || lsunit) {
+ if ((lsu || lsunit) && logversion == 1) {
fprintf(stderr, "log stripe unit specified, using v2 logs\n");
logversion = 2;
}
xfsrtextsize( char *path)
{
int fd, rval, rtextsize;
- xfs_fsop_geom_t geo;
+ xfs_fsop_geom_v1_t geo;
fd = open( path, O_RDONLY );
if ( fd < 0 ) {
perror(path);
return -1;
}
- rval = ioctl(fd, XFS_IOC_FSGEOMETRY, &geo );
+ rval = ioctl( fd, XFS_IOC_FSGEOMETRY_V1, &geo );
close(fd);
+ if ( rval < 0 )
+ return -1;
rtextsize = geo.rtextsize * geo.blocksize;
- if ( rval < 0 )
- return -1;
return rtextsize;
}