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
594 db_objs = TEE_Malloc(sizeof(*db_objs), TEE_MALLOC_FILL_ZERO); in init_persistent_db()
595 if (!db_main || !db_objs) in init_persistent_db()
611 size = sizeof(*db_objs); in init_persistent_db()
612 res = TEE_ReadObjectData(db_hdl, db_objs, size, &size); in init_persistent_db()
613 if (res || size != sizeof(*db_objs)) in init_persistent_db()
616 if (db_objs->count > 0) { in init_persistent_db()
617 size += db_objs->count * sizeof(TEE_UUID); in init_persistent_db()
618 ptr = TEE_Realloc(db_objs, size); in init_persistent_db()
622 db_objs = ptr; in init_persistent_db()
623 size -= sizeof(*db_objs); in init_persistent_db()
624 res = TEE_ReadObjectData(db_hdl, db_objs->uuids, size, in init_persistent_db()
626 if (res || size != (db_objs->count * sizeof(TEE_UUID))) in init_persistent_db()
630 for (idx = 0; idx < db_objs->count; idx++) { in init_persistent_db()
640 TEE_MemMove(uuid, &db_objs->uuids[idx], sizeof(*uuid)); in init_persistent_db()
683 sizeof(*db_objs)); in init_persistent_db()
692 db_objs->count = 0; in init_persistent_db()
693 res = TEE_WriteObjectData(db_hdl, db_objs, sizeof(*db_objs)); in init_persistent_db()
702 token->db_objs = db_objs; in init_persistent_db()
709 TEE_Free(db_objs); in init_persistent_db()