From 3f8fc5ad7d36fa171559e7b94b0fd211ba2a4561 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 16 Jan 2009 13:22:26 +0100 Subject: [PATCH] net engine: accept both upper and lowercase tcp/udp. Signed-off-by: Jens Axboe --- engines/net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/net.c b/engines/net.c index 2a9caaa2..8dbc2a85 100644 --- a/engines/net.c +++ b/engines/net.c @@ -452,9 +452,11 @@ static int fio_netio_init(struct thread_data *td) goto bad_host; if (modep) { - if (!strncmp("tcp", modep, strlen(modep))) + if (!strncmp("tcp", modep, strlen(modep)) || + !strncmp("TCP", modep, strlen(modep))) nd->net_protocol = IPPROTO_TCP; - else if (!strncmp("udp", modep, strlen(modep))) + else if (!strncmp("udp", modep, strlen(modep)) || + !strncmp("UDP", modep, strlen(modep))) nd->net_protocol = IPPROTO_UDP; else goto bad_host; -- 2.25.1