[stgt] [patch] v1 - Remove a misleading error message.

Mark Harvey markh794 at gmail.com
Wed Oct 29 02:05:44 CET 2008


I have no personal preference to wording hence am submitting two different patches.

If this is the accepted patch, 'ssc' could potentially be removed as a valid device-type.

Cheers
Mark

>From 6742edcd7d8295b4cc329c8d50b06082b1304a69 Mon Sep 17 00:00:00 2001
From: Mark Harvey <markh794 at gmail.com>
Date: Wed, 29 Oct 2008 11:56:53 +1100
Subject: Remove misleading error if trying to use 'device-type=tape'

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

diff --git a/usr/tgtadm.c b/usr/tgtadm.c
index 836efaa..51d470c 100644
--- a/usr/tgtadm.c
+++ b/usr/tgtadm.c
@@ -329,10 +329,9 @@ static int str_to_device_type(char *str)
 {
 	if (!strcmp(str, "disk"))
 		return TYPE_DISK;
-	else if (!strcmp(str, "tape")) {
-		eprintf("type emulation isn't supported yet\n");
-		exit(EINVAL);
-	} else if (!strcmp(str, "cd"))
+	else if (!strcmp(str, "tape"))
+		return TYPE_TAPE;
+	else if (!strcmp(str, "cd"))
 		return TYPE_MMC;
 	else if (!strcmp(str, "changer"))
 		return TYPE_MEDIUM_CHANGER;
-- 
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