From e2e722d72371c8bb16056cb886f0e8b6bfea96f7 Mon Sep 17 00:00:00 2001 From: William Dauchy Date: Thu, 5 Jan 2012 11:45:04 +0100 Subject: [PATCH 2/2] Fix printed message from stmfadm import-lu when the Logical Unit is used --- usr/src/cmd/stmfadm/stmfadm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/src/cmd/stmfadm/stmfadm.c b/usr/src/cmd/stmfadm/stmfadm.c index 0c98614..56f6325 100644 --- a/usr/src/cmd/stmfadm/stmfadm.c +++ b/usr/src/cmd/stmfadm/stmfadm.c @@ -1161,6 +1161,7 @@ importLuFunc(int operandLen, char *operands[], cmdOptions_t *options, int ret = 0; char guidAsciiBuf[33]; stmfGuid createdGuid; + char* lu_message = "imported"; stmfRet = stmfImportLu(STMF_DISK, operands[0], &createdGuid); switch (stmfRet) { @@ -1180,7 +1181,7 @@ importLuFunc(int operandLen, char *operands[], cmdOptions_t *options, case STMF_ERROR_FILE_IN_USE: (void) fprintf(stderr, "%s: filename %s: %s\n", cmdName, operands[0], gettext("in use")); - ret++; + lu_message = "used"; break; case STMF_ERROR_GUID_IN_USE: (void) fprintf(stderr, "%s: %s\n", cmdName, @@ -1227,7 +1228,7 @@ importLuFunc(int operandLen, char *operands[], cmdOptions_t *options, createdGuid.guid[9], createdGuid.guid[10], createdGuid.guid[11], createdGuid.guid[12], createdGuid.guid[13], createdGuid.guid[14], createdGuid.guid[15]); - (void) printf("Logical unit imported: %s\n", guidAsciiBuf); + (void) printf("Logical unit %s: %s\n", lu_message, guidAsciiBuf); done: return (ret); -- 2.4.6