This ioctl will be dropped soon, so port the program to use ftruncate,
which does the same thing.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
print_getbmapx(file, fd, 0, 0);
- flock.l_whence = 0;
- flock.l_start= 0;
- flock.l_len = 0;
- xfsctl(file, fd, XFS_IOC_FREESP64, &flock);
+ if (ftruncate(fd, 0)) {
+ perror("ftruncate");
+ exit(1);
+ }
+
print_getbmapx(file, fd, 0, 0);
close(fd);
}