Lines Matching defs:results

50  * Buffer management for results.
152 * response is sent back as a packed nvlist of results.
165 nvlist_t *results = NULL;
172 /* Special case to free a results buffer */
196 rv = cmd_getinfo(args, &results);
199 rv = cmd_changestate(args, &results);
203 rv = cmd_private(cmd, args, &results);
215 * If an nvlist was constructed for the results,
216 * then pack the results nvlist and return it.
218 if (results != NULL) {
223 /* Add a sequence number to the results */
225 if (nvlist_add_uint64(results, HPD_SEQNUM, seqnum) != 0) {
231 /* Pack the results nvlist */
232 if (nvlist_pack(results, &buf, &len,
234 log_err("Cannot pack door results.\n");
239 /* Link results buffer into list */
242 /* The results nvlist is no longer needed */
243 nvlist_free(results);
245 /* Return the results */
258 if (results != NULL)
259 nvlist_free(results);
295 nvlist_t *results;
332 /* Allocate nvlist for results */
333 if (nvlist_alloc(&results, NV_UNIQUE_NAME_TYPE, 0) != 0) {
339 /* Add snapshot and successful status to results */
340 if ((nvlist_add_int32(results, HPD_STATUS, 0) != 0) ||
341 (nvlist_add_byte_array(results, HPD_INFO,
344 nvlist_free(results);
353 *resultsp = results;
368 nvlist_t *results = NULL;
413 * Pack the results into an nvlist if there is an error snapshot.
415 * If any error occurs while packing the results, the original
422 dprintf("cmd_changestate: results nvlist required.\n");
433 /* Allocate nvlist for results */
434 if (nvlist_alloc(&results, NV_UNIQUE_NAME_TYPE, 0) != 0) {
440 /* Add the results into the nvlist */
441 if ((nvlist_add_int32(results, HPD_STATUS, status) != 0) ||
442 (nvlist_add_byte_array(results, HPD_INFO, (uchar_t *)buf,
445 nvlist_free(results);
450 *resultsp = results;
466 nvlist_t *results = NULL;
512 /* Allocate nvlist for results */
513 if (nvlist_alloc(&results, NV_UNIQUE_NAME_TYPE, 0) != 0) {
519 /* Add values and status to the results */
520 if ((nvlist_add_int32(results, HPD_STATUS, status) != 0) ||
521 (nvlist_add_string(results, HPD_OPTIONS, values) != 0)) {
523 nvlist_free(results);
531 *resultsp = results;
540 * Allocate the next unique sequence number for a results buffer.
559 * Link a results buffer into the list containing all buffers.
568 log_err("Cannot allocate results buffer: %s\n",
587 * Remove a results buffer from the list containing all buffers.