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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Mark Harvey <markh794@xxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux