Lines Matching refs: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 */
257 nvlist_free(results);
293 nvlist_t *results;
330 /* Allocate nvlist for results */
331 if (nvlist_alloc(&results, NV_UNIQUE_NAME_TYPE, 0) != 0) {
337 /* Add snapshot and successful status to results */
338 if ((nvlist_add_int32(results, HPD_STATUS, 0) != 0) ||
339 (nvlist_add_byte_array(results, HPD_INFO,
342 nvlist_free(results);
351 *resultsp = results;
366 nvlist_t *results = NULL;
411 * Pack the results into an nvlist if there is an error snapshot.
413 * If any error occurs while packing the results, the original
420 dprintf("cmd_changestate: results nvlist required.\n");
431 /* Allocate nvlist for results */
432 if (nvlist_alloc(&results, NV_UNIQUE_NAME_TYPE, 0) != 0) {
438 /* Add the results into the nvlist */
439 if ((nvlist_add_int32(results, HPD_STATUS, status) != 0) ||
440 (nvlist_add_byte_array(results, HPD_INFO, (uchar_t *)buf,
443 nvlist_free(results);
448 *resultsp = results;
464 nvlist_t *results = NULL;
510 /* Allocate nvlist for results */
511 if (nvlist_alloc(&results, NV_UNIQUE_NAME_TYPE, 0) != 0) {
517 /* Add values and status to the results */
518 if ((nvlist_add_int32(results, HPD_STATUS, status) != 0) ||
519 (nvlist_add_string(results, HPD_OPTIONS, values) != 0)) {
521 nvlist_free(results);
529 *resultsp = results;
538 * Allocate the next unique sequence number for a results buffer.
557 * Link a results buffer into the list containing all buffers.
566 log_err("Cannot allocate results buffer: %s\n",
585 * Remove a results buffer from the list containing all buffers.