[stgt] [PATCH V2 8/8] mgmt: add TGTADM_DRIVER_ACTIVE and return it when trying stop a busy lld
Roi Dayan
roid at mellanox.com
Wed Jul 18 11:36:15 CEST 2012
Signed-off-by: Roi Dayan <roid at mellanox.com>
---
usr/mgmt.c | 2 +-
usr/tgtadm.c | 1 +
usr/tgtadm_error.h | 1 +
3 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/usr/mgmt.c b/usr/mgmt.c
index 2590a29..c0bf7be 100644
--- a/usr/mgmt.c
+++ b/usr/mgmt.c
@@ -456,7 +456,7 @@ static tgtadm_err lld_mgmt(int lld_no, struct mgmt_task *mtask)
}
adm_err = TGTADM_SUCCESS;
} else
- adm_err = TGTADM_TARGET_ACTIVE;
+ adm_err = TGTADM_DRIVER_ACTIVE;
} else
adm_err = TGTADM_SUCCESS;
break;
diff --git a/usr/tgtadm.c b/usr/tgtadm.c
index 46950f1..a08324c 100644
--- a/usr/tgtadm.c
+++ b/usr/tgtadm.c
@@ -77,6 +77,7 @@ static const char * tgtadm_strerror(int err)
"this target already has an outgoing account" },
{ TGTADM_TARGET_ACTIVE, "this target is still active" },
{ TGTADM_LUN_ACTIVE, "this logical unit is still active" },
+ { TGTADM_DRIVER_ACTIVE, "this driver is busy" },
{ TGTADM_UNSUPPORTED_OPERATION,
"this operation isn't supported" },
{ TGTADM_UNKNOWN_PARAM, "unknown parameter" },
diff --git a/usr/tgtadm_error.h b/usr/tgtadm_error.h
index 1d71cce..2336ab1 100644
--- a/usr/tgtadm_error.h
+++ b/usr/tgtadm_error.h
@@ -26,6 +26,7 @@ enum tgtadm_errno {
TGTADM_OUTACCOUNT_EXIST,
TGTADM_TARGET_ACTIVE,
TGTADM_LUN_ACTIVE,
+ TGTADM_DRIVER_ACTIVE,
TGTADM_UNSUPPORTED_OPERATION,
TGTADM_UNKNOWN_PARAM,
--
1.7.8.2
--
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