diff options
author | srivijitha dugganapalli <Srivijitha.Dugganapalli@Sun.COM> | 2010-06-09 09:43:56 -0600 |
---|---|---|
committer | srivijitha dugganapalli <Srivijitha.Dugganapalli@Sun.COM> | 2010-06-09 09:43:56 -0600 |
commit | a1837c6df940f4a4992df53cc52935596ced1b89 (patch) | |
tree | ebe8d78699645751c7e2a549ae04051ffb8ed85a /usr/src/lib/libstmf | |
parent | d5ab4bd8f9e03d84b5f600a779f771e2efa7eb82 (diff) | |
download | illumos-joyent-a1837c6df940f4a4992df53cc52935596ced1b89.tar.gz |
6940963 stmfImportLu() should populate luGuid when error STMF_ERROR_FILE_IN_USE is returned
Diffstat (limited to 'usr/src/lib/libstmf')
-rw-r--r-- | usr/src/lib/libstmf/common/stmf.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr/src/lib/libstmf/common/stmf.c b/usr/src/lib/libstmf/common/stmf.c index 54599ea240..216a14460d 100644 --- a/usr/src/lib/libstmf/common/stmf.c +++ b/usr/src/lib/libstmf/common/stmf.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <stdlib.h> @@ -1414,6 +1413,13 @@ importDiskLu(char *fname, stmfGuid *createdGuid) ioctlRet = ioctl(fd, SBD_IOCTL_IMPORT_LU, &sbdIoctl); if (ioctlRet != 0) { + + if (createdGuid && sbdIoctl.stmf_error == + SBD_RET_FILE_ALREADY_REGISTERED) { + bcopy(sbdLu->ilu_ret_guid, createdGuid->guid, + sizeof (sbdLu->ilu_ret_guid)); + } + savedErrno = errno; switch (savedErrno) { case EBUSY: @@ -1435,6 +1441,7 @@ importDiskLu(char *fname, stmfGuid *createdGuid) } } + if (ret != STMF_STATUS_SUCCESS) { goto done; } |