From: Jens Axboe Date: Fri, 16 Jan 2009 12:22:26 +0000 (+0100) Subject: net engine: accept both upper and lowercase tcp/udp. X-Git-Tag: fio-1.24~10 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=3f8fc5ad7d36fa171559e7b94b0fd211ba2a4561;ds=sidebyside net engine: accept both upper and lowercase tcp/udp. Signed-off-by: Jens Axboe --- 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;