From db0bb90c118a18b680600346379b69e21e744adc Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 5 Aug 2003 07:14:10 +0000 Subject: [PATCH] Fix xfs_io so that it can take input from non-XFS files --- io/open.c | 3 +++ io/pwrite.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/io/open.c b/io/open.c index 54919459d..01089aa27 100644 --- 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"), diff --git a/io/pwrite.c b/io/pwrite.c index aa0d28028..6d4079e72 100644 --- a/io/pwrite.c +++ b/io/pwrite.c @@ -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)) { -- 2.47.2