Lines Matching refs:info
238 struct ctlib_status_info *info; in ct_status_read() local
241 info = malloc(sizeof (struct ctlib_status_info)); in ct_status_read()
242 if (info == NULL) in ct_status_read()
245 info->status.ctst_detail = detail; in ct_status_read()
248 info->status.ctst_nbytes = status_nbytes; in ct_status_read()
249 info->status.ctst_buffer = status_buffer; in ct_status_read()
251 error = ioctl(fd, CT_SSTATUS, &info->status); in ct_status_read()
255 if (info->status.ctst_nbytes <= status_nbytes) in ct_status_read()
260 status_nbytes = info->status.ctst_nbytes; in ct_status_read()
265 if ((errno = nvlist_unpack(info->status.ctst_buffer, in ct_status_read()
266 info->status.ctst_nbytes, &info->nvl, 0)) != 0) in ct_status_read()
273 info->status.ctst_nbytes = 0; in ct_status_read()
274 info->nvl = NULL; in ct_status_read()
275 if (ioctl(fd, CT_SSTATUS, &info->status) == -1) in ct_status_read()
279 *stathdl = info; in ct_status_read()
286 if (info) in ct_status_read()
287 free(info); in ct_status_read()
294 struct ctlib_status_info *info = stathdl; in ct_status_free() local
296 if (info->nvl) { in ct_status_free()
297 assert(info->status.ctst_detail != CTD_COMMON); in ct_status_free()
298 nvlist_free(info->nvl); in ct_status_free()
301 free(info); in ct_status_free()
307 struct ctlib_status_info *info = stathdl; in ct_status_get_id() local
308 return (info->status.ctst_id); in ct_status_get_id()
314 struct ctlib_status_info *info = stathdl; in ct_status_get_zoneid() local
315 return (info->status.ctst_zoneid); in ct_status_get_zoneid()
321 struct ctlib_status_info *info = stathdl; in ct_status_get_type() local
322 return (types[info->status.ctst_type].type_name); in ct_status_get_type()
328 struct ctlib_status_info *info = stathdl; in ct_status_get_holder() local
329 return (info->status.ctst_holder); in ct_status_get_holder()
335 struct ctlib_status_info *info = stathdl; in ct_status_get_state() local
336 return (info->status.ctst_state); in ct_status_get_state()
342 struct ctlib_status_info *info = stathdl; in ct_status_get_nevents() local
343 return (info->status.ctst_nevents); in ct_status_get_nevents()
349 struct ctlib_status_info *info = stathdl; in ct_status_get_ntime() local
350 return (info->status.ctst_ntime); in ct_status_get_ntime()
356 struct ctlib_status_info *info = stathdl; in ct_status_get_qtime() local
357 return (info->status.ctst_qtime); in ct_status_get_qtime()
363 struct ctlib_status_info *info = stathdl; in ct_status_get_nevid() local
364 return (info->status.ctst_nevid); in ct_status_get_nevid()
370 struct ctlib_status_info *info = stathdl; in ct_status_get_informative() local
371 return (info->status.ctst_informative); in ct_status_get_informative()
377 struct ctlib_status_info *info = stathdl; in ct_status_get_critical() local
378 return (info->status.ctst_critical); in ct_status_get_critical()
384 struct ctlib_status_info *info = stathdl; in ct_status_get_cookie() local
385 return (info->status.ctst_cookie); in ct_status_get_cookie()
416 struct ctlib_event_info *info; in ct_event_read_internal() local
420 info = malloc(sizeof (struct ctlib_event_info)); in ct_event_read_internal()
421 if (info == NULL) in ct_event_read_internal()
423 info->nvl = NULL; in ct_event_read_internal()
424 event = &info->event; in ct_event_read_internal()
449 if (event->ctev_goffset > 0 && (error = unpack_and_merge(&info->nvl, in ct_event_read_internal()
454 (error = unpack_and_merge(&info->nvl, in ct_event_read_internal()
461 *evt = info; in ct_event_read_internal()
467 if (info) { in ct_event_read_internal()
468 nvlist_free(info->nvl); in ct_event_read_internal()
469 free(info); in ct_event_read_internal()
505 struct ctlib_event_info *info = evthdl; in ct_event_free() local
507 nvlist_free(info->nvl); in ct_event_free()
508 free(info); in ct_event_free()
515 struct ctlib_event_info *info = evthdl; in ct_event_get_flags() local
516 return (info->event.ctev_flags); in ct_event_get_flags()
522 struct ctlib_event_info *info = evthdl; in ct_event_get_ctid() local
523 return (info->event.ctev_id); in ct_event_get_ctid()
529 struct ctlib_event_info *info = evthdl; in ct_event_get_evid() local
530 return (info->event.ctev_evid); in ct_event_get_evid()
536 struct ctlib_event_info *info = evthdl; in ct_event_get_type() local
537 return (info->event.ctev_type); in ct_event_get_type()
543 struct ctlib_event_info *info = evthdl; in ct_event_get_nevid() local
544 if (info->nvl == NULL || in ct_event_get_nevid()
545 nvlist_lookup_uint64(info->nvl, CTS_NEVID, evidp)) in ct_event_get_nevid()
553 struct ctlib_event_info *info = evthdl; in ct_event_get_newct() local
554 if (info->nvl == NULL || in ct_event_get_newct()
555 nvlist_lookup_int32(info->nvl, CTS_NEWCT, (int *)ctidp)) in ct_event_get_newct()