When invoking ctladm devlist the command will always have a return value of 1 whether the commands succeed or not. The part responsible for this: retval = XML_Parse(parser, lun_str, strlen(lun_str), 1); XML_ParserFree(parser); if (retval != 1) { retval = 1; goto bailout; } Should ctladm not return 0 (zero) in case of success?
It has been fixed in the meantime, thanks for reporting