-int com_lsatt(struct command_context *cc)
-{
- unsigned flags = 0;
- struct osl_object options = {.data = &flags, .size = sizeof(flags)};
- int ret, i;
-
- for (i = 1; i < cc->argc; i++) {
- const char *arg = cc->argv[i];
- if (arg[0] != '-')
- break;
- if (!strcmp(arg, "--")) {
- i++;
- break;
- }
- if (!strcmp(arg, "-i")) {
- flags |= LSATT_FLAG_SORT_BY_ID;
- continue;
- }
- if (!strcmp(arg, "-l")) {
- flags |= LSATT_FLAG_LONG;
- continue;
- }
- if (!strcmp(arg, "-r")) {
- flags |= LSATT_FLAG_REVERSE;
- continue;
- }
- }
- ret = send_option_arg_callback_request(&options, cc->argc - i, cc->argv + i,
- com_lsatt_callback, afs_cb_result_handler, cc);
+ ret = lls(lls_deserialize_parse_result(aca->query.data, cmd, &aca->lpr));
+ assert(ret >= 0);
+ pmd.lpr = aca->lpr;
+ i_given = SERVER_CMD_OPT_GIVEN(LSATT, ID_SORT, aca->lpr);
+ r_given = SERVER_CMD_OPT_GIVEN(LSATT, REVERSE, aca->lpr);
+
+ if (i_given)
+ pmd.loop_col_num = ATTCOL_BITNUM;
+ if (r_given)
+ pmd.pm_flags |= PM_REVERSE_LOOP;
+ ret = for_each_matching_row(&pmd);