Actions
Bug #1978
closediPsGetSetStmfProp is missing some brackets
Start date:
2012-01-12
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
In iPsGetSetStmfProp() (http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libstmf/common/store.c#iPsGetSetStmfProp), there is this code:
2345 switch (propType) { 2346 case STMF_DEFAULT_LU_STATE : 2347 psStmfProp = DEFAULT_LU_STATE; 2348 if (strcasecmp(propVal, "online") == 0) 2349 psStmfPropVal = STMF_PS_LU_ONLINE; 2350 else if (strcasecmp(propVal, "offline") == 0) 2351 psStmfPropVal = STMF_PS_LU_OFFLINE; 2352 else 2353 ret = STMF_PS_ERROR; 2354 goto out; 2355 break; 2356 case STMF_DEFAULT_TARGET_PORT_STATE : 2357 psStmfProp = DEFAULT_TARGET_PORT_STATE; 2358 if (strcasecmp(propVal, "online") == 0) 2359 psStmfPropVal = 2360 STMF_PS_TARGET_PORT_ONLINE; 2361 else if (strcasecmp(propVal, "offline") == 0) 2362 psStmfPropVal = 2363 STMF_PS_TARGET_PORT_OFFLINE; 2364 else 2365 ret = STMF_PS_ERROR; 2366 goto out; 2367 break; 2368 default : 2369 ret = STMF_PS_ERROR; 2370 goto out; 2371 break; 2372 }
On lines 2352, 2354, 2364, 2366 there are missing brackets. As the result, setting LU and port status ends too soon.
Files
Actions