From 17bcf0ee3e66554630332d46322669093ad2406c Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 8 Feb 2007 22:35:12 +0000 Subject: [PATCH] The text pattern (the default) could not be selected. Fixed now. --- sysutils/iogen/Makefile | 4 ++-- sysutils/iogen/src/iogen.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sysutils/iogen/Makefile b/sysutils/iogen/Makefile index bd8bfdc5ea5..8fa98dbe22c 100644 --- a/sysutils/iogen/Makefile +++ b/sysutils/iogen/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.13 2007/02/07 14:43:03 marco Exp $ +# $OpenBSD: Makefile,v 1.14 2007/02/08 22:35:12 marco Exp $ COMMENT= "i/o generator" -PKGNAME= iogen-2.1 +PKGNAME= iogen-2.2 CATEGORIES= sysutils DISTFILES= diff --git a/sysutils/iogen/src/iogen.c b/sysutils/iogen/src/iogen.c index 51ff19489cf..1d5a86be4fb 100644 --- a/sysutils/iogen/src/iogen.c +++ b/sysutils/iogen/src/iogen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iogen.c,v 1.5 2007/02/07 14:43:03 marco Exp $ */ +/* $OpenBSD: iogen.c,v 1.6 2007/02/08 22:35:12 marco Exp $ */ /* * Copyright (c) 2005 Marco Peereboom * @@ -127,7 +127,6 @@ killall(void) int get_pattern(int pat, struct iog_pattern *ip) { - u_int64_t pa = IOGEN_PAT_TEXT; u_int64_t scratch[MAX_PAT_SIZE / sizeof(u_int64_t)]; u_int32_t s = 0; u_int8_t *p; @@ -255,6 +254,9 @@ get_pattern(int pat, struct iog_pattern *ip) *p++ = x; ip->size = x; break; + case IOGEN_PAT_TEXT: + ip->pattern = pat; + return (0); default: return (1); } @@ -702,7 +704,7 @@ main(int argc, char *argv[]) } pattern = atoi(optarg); - if (pattern >= IOGEN_PAT_TEXT) + if (pattern > IOGEN_PAT_TEXT) errx(1, "illegal pattern"); break; case 'h':