[Marevell] Fix armhf build failure (#9875)

Signed-off-by: Rajkumar Pennadam Ramamoorthy <rpennadamram@marvell.com>
This commit is contained in:
Rajkumar-Marvell 2022-02-28 11:10:58 +05:30 committed by GitHub
parent b8fa5e0d8d
commit 5daf482a95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -6,8 +6,11 @@ from os import path
RNDADDENTROPY=0x40085203
def avail():
with open("/proc/sys/kernel/random/entropy_avail", mode='r') as avail:
return int(avail.read())
if path.exists("/proc/sys/kernel/random/entropy_avail"):
with open("/proc/sys/kernel/random/entropy_avail", mode='r') as avail:
return int(avail.read())
else:
return int(2048)
if path.exists("/proc/sys/kernel/random/entropy_avail"):
while 1:

View File

@ -6,8 +6,11 @@ from os import path
RNDADDENTROPY=0x40085203
def avail():
with open("/proc/sys/kernel/random/entropy_avail", mode='r') as avail:
return int(avail.read())
if path.exists("/proc/sys/kernel/random/entropy_avail"):
with open("/proc/sys/kernel/random/entropy_avail", mode='r') as avail:
return int(avail.read())
else:
return int(2048)
if path.exists("/proc/sys/kernel/random/entropy_avail"):
while 1: