Lines Matching refs:db_objs

300 	for (i = 0; i < token->db_objs->count; i++)  in get_persistent_obj_idx()
301 if (!TEE_MemCompare(token->db_objs->uuids + i, in get_persistent_obj_idx()
342 *size = token->db_objs->count * sizeof(TEE_UUID); in get_persistent_objects_list()
348 TEE_MemMove(array, token->db_objs->uuids, *size); in get_persistent_objects_list()
372 ((token->db_objs->count - 1) * sizeof(TEE_UUID)), in unregister_persistent_object()
388 TEE_MemMove(ptr, token->db_objs, in unregister_persistent_object()
396 &token->db_objs->uuids[idx + 1], in unregister_persistent_object()
404 TEE_Free(token->db_objs); in unregister_persistent_object()
405 token->db_objs = ptr; in unregister_persistent_object()
427 count = token->db_objs->count; in register_persistent_object()
428 ptr = TEE_Realloc(token->db_objs, in register_persistent_object()
434 token->db_objs = ptr; in register_persistent_object()
435 TEE_MemMove(token->db_objs->uuids + count, uuid, sizeof(TEE_UUID)); in register_persistent_object()
454 token->db_objs->count++; in register_persistent_object()
456 res = TEE_WriteObjectData(db_hdl, token->db_objs, in register_persistent_object()
458 token->db_objs->count * sizeof(TEE_UUID)); in register_persistent_object()
460 token->db_objs->count--; in register_persistent_object()
585 struct token_persistent_objs *db_objs = NULL; in init_persistent_db() local
596 db_objs = TEE_Malloc(sizeof(*db_objs), TEE_MALLOC_FILL_ZERO); in init_persistent_db()
597 if (!db_main || !db_objs) in init_persistent_db()
613 size = sizeof(*db_objs); in init_persistent_db()
614 res = TEE_ReadObjectData(db_hdl, db_objs, size, &size); in init_persistent_db()
615 if (res || size != sizeof(*db_objs)) in init_persistent_db()
618 if (db_objs->count > 0) { in init_persistent_db()
619 size += db_objs->count * sizeof(TEE_UUID); in init_persistent_db()
620 ptr = TEE_Realloc(db_objs, size); in init_persistent_db()
624 db_objs = ptr; in init_persistent_db()
625 size -= sizeof(*db_objs); in init_persistent_db()
626 res = TEE_ReadObjectData(db_hdl, db_objs->uuids, size, in init_persistent_db()
628 if (res || size != (db_objs->count * sizeof(TEE_UUID))) in init_persistent_db()
632 for (idx = 0; idx < db_objs->count; idx++) { in init_persistent_db()
642 TEE_MemMove(uuid, &db_objs->uuids[idx], sizeof(*uuid)); in init_persistent_db()
677 initial_data_size = sizeof(*db_main) + sizeof(*db_objs); in init_persistent_db()
704 token->db_objs = db_objs; in init_persistent_db()
711 TEE_Free(db_objs); in init_persistent_db()