-BT_HIDDEN
-int ctf_fs_ds_file_borrow_packet_header_context_fields(
- struct ctf_fs_ds_file *ds_file,
- struct bt_field **packet_header_field,
- struct bt_field **packet_context_field)
-{
- enum bt_notif_iter_status notif_iter_status;
- int ret = 0;
-
- BT_ASSERT(ds_file);
- notif_iter_status = bt_notif_iter_borrow_packet_header_context_fields(
- ds_file->notif_iter, packet_header_field, packet_context_field);
- switch (notif_iter_status) {
- case BT_NOTIF_ITER_STATUS_EOF:
- case BT_NOTIF_ITER_STATUS_OK:
- break;
- case BT_NOTIF_ITER_STATUS_AGAIN:
- abort();
- case BT_NOTIF_ITER_STATUS_INVAL:
- case BT_NOTIF_ITER_STATUS_ERROR:
- default:
- goto error;
- break;
- }
-
- goto end;
-
-error:
- ret = -1;
-
-end:
- return ret;
-}
-