If an expected error is returned from llapi_ping() for an inactive device
print a more useful message.
b=16208
if (rc == 1)
return 0;
- return rc;
+ return errno;
}
int llapi_target_iterate(int type_num, char **obd_type, void *args, llapi_cb_t cb)
int rc;
rc = llapi_ping(obd_type_name, obd_name);
- if (rc) {
+ if (rc == ENOTCONN || rc == ESHUTDOWN) {
+ llapi_printf(LLAPI_MSG_NORMAL, "%s inactive.\n", obd_name);
+ } else if (rc) {
llapi_err(LLAPI_MSG_ERROR, "error: check '%s'", obd_name);
} else {
llapi_printf(LLAPI_MSG_NORMAL, "%s active.\n", obd_name);