Don Cragun wrote: > John Forte wrote: >> Don Cragun wrote: >>>>>> >>>>>> 4.3 stmfGetAluaState >>>>>> >>>>>> NAME >>>>>> stmfGetAluaState >>>>>> >>>>>> SYNOPSIS >>>>>> cc [ flag... ] file... -lstmf [ library... ] >>>>>> #include <libstmf.h> >>>>>> >>>>>> int stmfGetAluaState(boolean_t *enabled, uint8_t *node) >>>>>> >>>>>> PARAMETERS >>>>>> enabled set to B_TRUE or B_FALSE on success >>>>>> >>>>>> node set to 0 or 1 on success >>>>>> >>>>>> DESCRIPTION >>>>>> The stmfGetAluaState() function returns the Asymmetric >>>>>> Logical Unit Access >>>>>> State (ALUA) mode for STMF along with the node setting. >>>>>> >>>>>> RETURN VALUES >>>>>> >>>>>> The following values are returned: >>>>>> >>>>>> STMF_ERROR_INVALID_ARG Either enabled or node was NULL. >>>>>> >>>>>> STMF_STATUS_SUCCESS The API call was successful >>>>> >>>>> So, if I call stmfSetAluaState(B_TRUE, 0) and >>>>> stmfSetAluaState(B_TRUE, >>>>> 1) and then call stmfGetAluaState(&state, &node) what is it >>>>> supposed to >>>>> do? >>>> Return the last node id set, which in this case would be 1 along >>>> with a state of B_TRUE. >>> >>> I understand what you're doing now, but I still find "disabled" in this >>> presentation mode ambiguous. I read it as "Either the node (or the >>> ALUA) is enabled, or the value of node is a null pointer." >> I think you've lost me. If "node" is NULL, it's an error. There is no >> ambiguity there. If the ALUA state is disabled, "enabled" is set to >> B_FALSE. > > The ambiguity is whether "enabled" is referring to the state of the ALUA > or to the value of the parameter. If this was presented in a form where > "enabled" was in italics to clearly note that you are talking about the > parameter; it would be clear. But, on an ASCII man page, there are no > italics. Your description of these functions talks about the state of > the ALUA being enabled or disabled and uses a parameter named enabled to > specify this. This makes your description of the STMF_ERROR_INVALID_ARG > condition ambiguous. > I didn't realize that you were talking about the RETURN VALUES section. I'll change the argument name to "state" but on a call to get the state, I'm not sure how else that word "enabled" could be interpreted in the context of an invalid argument.
- John - John