[stgt] [PATCH] 1/1 Make media type comparison case insensitive

Mark Harvey markh794 at gmail.com
Thu Jun 25 12:06:34 CEST 2009


>From 8bb6210e16e20e055c489b4fed1ad16bfaf96c3e Mon Sep 17 00:00:00 2001
From: Mark Harvey <markh794 at gmail.com>
Date: Thu, 25 Jun 2009 19:55:52 +1000
Subject: tgtimg: Make media type compare case insensitive.

Signed-off-by: Mark Harvey <markh794 at gmail.com>
---
 usr/tgtimg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/tgtimg.c b/usr/tgtimg.c
index 9e11f23..13f236c 100644
--- a/usr/tgtimg.c
+++ b/usr/tgtimg.c
@@ -290,10 +290,10 @@ static int ssc_new(int op, char *path, char *barcode, char *capacity,
 	memcpy(mi.medium_manufacturer, "Foo     ", 8);
 	memcpy(mi.application_vendor, "Bar     ", 8);
 
-	if (!strncmp("clean", media_type, 5)) {
+	if (!strncasecmp("clean", media_type, 5)) {
 		mi.medium_type = CART_CLEAN;
 		mi.medium_type_information = 20; /* Max cleaning loads */
-	} else if (!strncmp("WORM", media_type, 4))
+	} else if (!strncasecmp("WORM", media_type, 4))
 		mi.medium_type = CART_WORM;
 	else
 		mi.medium_type = CART_DATA;
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list