Lines Matching refs:info
240 struct ctlib_status_info *info; in ct_status_read() local
243 info = malloc(sizeof (struct ctlib_status_info)); in ct_status_read()
244 if (info == NULL) in ct_status_read()
247 info->status.ctst_detail = detail; in ct_status_read()
250 info->status.ctst_nbytes = status_nbytes; in ct_status_read()
251 info->status.ctst_buffer = status_buffer; in ct_status_read()
253 error = ioctl(fd, CT_SSTATUS, &info->status); in ct_status_read()
257 if (info->status.ctst_nbytes <= status_nbytes) in ct_status_read()
262 status_nbytes = info->status.ctst_nbytes; in ct_status_read()
267 if ((errno = nvlist_unpack(info->status.ctst_buffer, in ct_status_read()
268 info->status.ctst_nbytes, &info->nvl, 0)) != 0) in ct_status_read()
275 info->status.ctst_nbytes = 0; in ct_status_read()
276 info->nvl = NULL; in ct_status_read()
277 if (ioctl(fd, CT_SSTATUS, &info->status) == -1) in ct_status_read()
281 *stathdl = info; in ct_status_read()
288 if (info) in ct_status_read()
289 free(info); in ct_status_read()
296 struct ctlib_status_info *info = stathdl; in ct_status_free() local
298 if (info->nvl) { in ct_status_free()
299 assert(info->status.ctst_detail != CTD_COMMON); in ct_status_free()
300 nvlist_free(info->nvl); in ct_status_free()
303 free(info); in ct_status_free()
309 struct ctlib_status_info *info = stathdl; in ct_status_get_id() local
310 return (info->status.ctst_id); in ct_status_get_id()
316 struct ctlib_status_info *info = stathdl; in ct_status_get_zoneid() local
317 return (info->status.ctst_zoneid); in ct_status_get_zoneid()
323 struct ctlib_status_info *info = stathdl; in ct_status_get_type() local
324 return (types[info->status.ctst_type].type_name); in ct_status_get_type()
330 struct ctlib_status_info *info = stathdl; in ct_status_get_holder() local
331 return (info->status.ctst_holder); in ct_status_get_holder()
337 struct ctlib_status_info *info = stathdl; in ct_status_get_state() local
338 return (info->status.ctst_state); in ct_status_get_state()
344 struct ctlib_status_info *info = stathdl; in ct_status_get_nevents() local
345 return (info->status.ctst_nevents); in ct_status_get_nevents()
351 struct ctlib_status_info *info = stathdl; in ct_status_get_ntime() local
352 return (info->status.ctst_ntime); in ct_status_get_ntime()
358 struct ctlib_status_info *info = stathdl; in ct_status_get_qtime() local
359 return (info->status.ctst_qtime); in ct_status_get_qtime()
365 struct ctlib_status_info *info = stathdl; in ct_status_get_nevid() local
366 return (info->status.ctst_nevid); in ct_status_get_nevid()
372 struct ctlib_status_info *info = stathdl; in ct_status_get_informative() local
373 return (info->status.ctst_informative); in ct_status_get_informative()
379 struct ctlib_status_info *info = stathdl; in ct_status_get_critical() local
380 return (info->status.ctst_critical); in ct_status_get_critical()
386 struct ctlib_status_info *info = stathdl; in ct_status_get_cookie() local
387 return (info->status.ctst_cookie); in ct_status_get_cookie()
418 struct ctlib_event_info *info; in ct_event_read_internal() local
422 info = malloc(sizeof (struct ctlib_event_info)); in ct_event_read_internal()
423 if (info == NULL) in ct_event_read_internal()
425 info->nvl = NULL; in ct_event_read_internal()
426 event = &info->event; in ct_event_read_internal()
451 if (event->ctev_goffset > 0 && (error = unpack_and_merge(&info->nvl, in ct_event_read_internal()
456 (error = unpack_and_merge(&info->nvl, in ct_event_read_internal()
463 *evt = info; in ct_event_read_internal()
469 if (info) { in ct_event_read_internal()
470 if (info->nvl) in ct_event_read_internal()
471 nvlist_free(info->nvl); in ct_event_read_internal()
472 free(info); in ct_event_read_internal()
508 struct ctlib_event_info *info = evthdl; in ct_event_free() local
510 if (info->nvl) in ct_event_free()
511 nvlist_free(info->nvl); in ct_event_free()
512 free(info); in ct_event_free()
519 struct ctlib_event_info *info = evthdl; in ct_event_get_flags() local
520 return (info->event.ctev_flags); in ct_event_get_flags()
526 struct ctlib_event_info *info = evthdl; in ct_event_get_ctid() local
527 return (info->event.ctev_id); in ct_event_get_ctid()
533 struct ctlib_event_info *info = evthdl; in ct_event_get_evid() local
534 return (info->event.ctev_evid); in ct_event_get_evid()
540 struct ctlib_event_info *info = evthdl; in ct_event_get_type() local
541 return (info->event.ctev_type); in ct_event_get_type()
547 struct ctlib_event_info *info = evthdl; in ct_event_get_nevid() local
548 if (info->nvl == NULL || in ct_event_get_nevid()
549 nvlist_lookup_uint64(info->nvl, CTS_NEVID, evidp)) in ct_event_get_nevid()
557 struct ctlib_event_info *info = evthdl; in ct_event_get_newct() local
558 if (info->nvl == NULL || in ct_event_get_newct()
559 nvlist_lookup_int32(info->nvl, CTS_NEWCT, (int *)ctidp)) in ct_event_get_newct()