[ocall] Support alternative dcap device nodes

This commit is contained in:
Qi Zheng 2023-06-26 14:17:39 +08:00 committed by volcano
parent 3530d8552c
commit 52d6a92929

@ -62,7 +62,9 @@ sgx_status_t occlum_ocall_sgx_calc_quote_size (
int occlum_ocall_detect_dcap_driver() { int occlum_ocall_detect_dcap_driver() {
return access("/dev/sgx/enclave", F_OK) == 0 && return access("/dev/sgx/enclave", F_OK) == 0 &&
access("/dev/sgx/provision", F_OK) == 0; access("/dev/sgx/provision", F_OK) == 0 ||
access("/dev/sgx_enclave", F_OK) == 0 &&
access("/dev/sgx_provision", F_OK) == 0 ;
} }
#define MAX_RETRY 5 #define MAX_RETRY 5