コード例 #1
0
ファイル: tee_api_objects.c プロジェクト: hsibert/optee_os
TEE_Result TEE_ReadObjectData(TEE_ObjectHandle object, void *buffer,
                              size_t size, uint32_t *count)
{
    TEE_Result res;

    if (object == TEE_HANDLE_NULL)
        TEE_Panic(0);

    res = utee_storage_obj_read(object, buffer, size, count);

    if (res != TEE_SUCCESS)
        TEE_Panic(0);

    return res;
}
コード例 #2
0
ファイル: tee_api_objects.c プロジェクト: ruchi393/optee_os
TEE_Result TEE_ReadObjectData(TEE_ObjectHandle object, void *buffer,
			      uint32_t size, uint32_t *count)
{
	TEE_Result res;

	if (object == TEE_HANDLE_NULL) {
		res = TEE_ERROR_BAD_PARAMETERS;
		goto out;
	}

	res = utee_storage_obj_read(object, buffer, size, count);

out:
	if (res != TEE_SUCCESS &&
	    res != TEE_ERROR_CORRUPT_OBJECT &&
	    res != TEE_ERROR_STORAGE_NOT_AVAILABLE)
		TEE_Panic(0);

	return res;
}
コード例 #3
0
TEE_Result TEE_ReadObjectData(TEE_ObjectHandle object, void *buffer,
			      uint32_t size, uint32_t *count)
{
	TEE_Result res;
	uint64_t cnt64;

	if (object == TEE_HANDLE_NULL) {
		res = TEE_ERROR_BAD_PARAMETERS;
		goto out;
	}

	cnt64 = *count;
	res = utee_storage_obj_read((unsigned long)object, buffer, size,
				    &cnt64);
	*count = cnt64;

out:
	if (res != TEE_SUCCESS &&
	    res != TEE_ERROR_CORRUPT_OBJECT &&
	    res != TEE_ERROR_STORAGE_NOT_AVAILABLE)
		TEE_Panic(res);

	return res;
}