- ret = send_option_arg_callback_request(&options, argc -i, argv + i,
- com_lsatt_callback, &result);
- if (ret > 0) {
- ret = send_buffer(fd, (char *)result.data);
- free(result.data);
- } else
- send_va_buffer(fd, "%s\n", PARA_STRERROR(-ret));
+ ret = send_option_arg_callback_request(&options, argc - i, argv + i,
+ com_lsatt_callback, send_result, &fd);
+ if (!ret) {
+ if (argc > 1)
+ ret = send_va_buffer(fd, "no matches\n");
+ } else if (ret < 0)
+ send_va_buffer(fd, "%s\n", para_strerror(-ret));