+static int blob_get_name_and_def_by_row(struct osl_table *table,
+ const struct osl_row *row, char **name, struct osl_object *def)
+{
+ struct osl_object obj;
+ int ret = osl_get_object(table, row, BLOBCOL_NAME, &obj);
+ if (ret < 0)
+ return ret;
+ *name = obj.data;
+ return osl_open_disk_object(table, row, BLOBCOL_DEF, def);
+}
+/** Define the \p get_name_and_def_by_row function for this blob type. */
+#define DEFINE_GET_NAME_AND_DEF_BY_ROW(table_name, cmd_prefix) \
+ int cmd_prefix ## _get_name_and_def_by_row(const struct osl_row *row, \
+ char **name, struct osl_object *def) \
+ { \
+ return blob_get_name_and_def_by_row(table_name ## _table, \
+ row, name, def); \
+ }
+