diff options
Diffstat (limited to 'cmd/zinject')
-rw-r--r-- | cmd/zinject/zinject.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cmd/zinject/zinject.c b/cmd/zinject/zinject.c index f1262ed77..a11b6d0b7 100644 --- a/cmd/zinject/zinject.c +++ b/cmd/zinject/zinject.c @@ -1083,6 +1083,22 @@ main(int argc, char **argv) libzfs_fini(g_zfs); return (1); } + + if (record.zi_nlanes) { + switch (io_type) { + case ZIO_TYPE_READ: + case ZIO_TYPE_WRITE: + case ZIO_TYPES: + break; + default: + (void) fprintf(stderr, "I/O type for a delay " + "must be 'read' or 'write'\n"); + usage(); + libzfs_fini(g_zfs); + return (1); + } + } + if (!error) error = ENXIO; |