}
ret = osl(osl_get_object(table, row, BLOBCOL_ID, &obj));
if (ret < 0) {
- para_printf(&lbad->pb, "%s: %s\n", name, para_strerror(-ret));
+ para_printf(&lbad->pb, "cannot list %s\n", name);
return ret;
}
id = *(uint32_t *)obj.data;
pmd.loop_col_num = BLOBCOL_ID;
ret = for_each_matching_row(&pmd);
if (ret < 0)
- para_printf(&lbad.pb, "%s\n", para_strerror(-ret));
- else if (pmd.num_matches == 0 && pmd.patterns.size > 0)
- para_printf(&lbad.pb, "no matches\n");
+ goto out;
+ if (pmd.num_matches == 0 && pmd.patterns.size > 0)
+ ret = -E_NO_MATCH;
+out:
flush_and_free_pb(&lbad.pb);
- return 0;
+ return ret;
}
static int com_lsblob(callback_function *f, struct command_context *cc)