+ ret = osl_get_object(table, row, ATTCOL_BITNUM, &bitnum_obj);
+ if (ret < 0) {
+ para_printf(&laad->pb, "%s: %s\n", name, PARA_STRERROR(-ret));
+ return 1;
+ }
+ para_printf(&laad->pb, "%u\t%s\n", *(unsigned char*)bitnum_obj.data,
+ name);
+ return 1;
+}
+
+static int com_lsatt_callback(const struct osl_object *query,
+ struct osl_object *result)
+{
+ struct lsatt_action_data laad = {.flags = *(unsigned *) query->data};
+ int ret;
+ struct pattern_match_data pmd = {
+ .table = attribute_table,
+ .loop_col_num = ATTCOL_BITNUM,
+ .match_col_num = ATTCOL_NAME,
+ .patterns = {.data = (char *)query->data + sizeof(laad.flags),
+ .size = query->size - sizeof(laad.flags)},
+ .pm_flags = PM_NO_PATTERN_MATCHES_EVERYTHING,
+ .data = &laad,
+ .action = print_attribute
+ };
+
+ if (laad.flags & LSATT_FLAG_ALPHA)
+ pmd.loop_col_num = ATTCOL_NAME;
+ if (laad.flags & LSATT_FLAG_REVERSE)
+ pmd.pm_flags |= PM_REVERSE_LOOP;
+ ret = for_each_matching_row(&pmd);