]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix xfs_io so that it can take input from non-XFS files
authorNathan Scott <nathans@sgi.com>
Tue, 5 Aug 2003 07:14:10 +0000 (07:14 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 5 Aug 2003 07:14:10 +0000 (07:14 +0000)
io/open.c
io/pwrite.c

index 54919459db51359d52be5e798fce5ebb17cb3595..01089aa27a771aad72dfec284336f4084c080add 100644 (file)
--- a/io/open.c
+++ b/io/open.c
@@ -74,6 +74,9 @@ openfile(
                perror(path);
                return -1;
        }
+       if (!geom)
+               return fd;
+
        if (!platform_test_xfs_fd(fd)) {
                fprintf(stderr, _("%s: specified file "
                        "[\"%s\"] is not on an XFS filesystem\n"),
index aa0d28028be9af9ccdf7d83d5c76c3cd9e9923d2..6d4079e726cfe3cba1745d6ee8ad751528bd1f53 100644 (file)
@@ -101,7 +101,6 @@ pwrite_f(
        ssize_t         count, total;
        unsigned int    seed = 0xcdcdcdcd;
        unsigned int    bsize = 4096;
-       xfs_fsop_geom_t geometry;
        char            *sp, *infile = NULL;
        int             c, fd = -1, dflag = 0;
 
@@ -160,7 +159,7 @@ pwrite_f(
                return 0;
 
        if (infile &&
-           ((fd = openfile(infile, &geometry, 0, 0, dflag, 1, 0, 0, 0)) < 0))
+           ((fd = openfile(infile, NULL, 0, 0, dflag, 1, 0, 0, 0)) < 0))
                return 0;
 
        if (!write_buffer(offset, count, bsize, fd, skip, &total)) {