Skip to content

Commit 7a79ac9

Browse files
committed
fixing few issues in entropy.utils
Signed-off-by: jackyalbo <jacky.albo@gmail.com>
1 parent 36c21ce commit 7a79ac9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/entropy_utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function generate_entropy(loop_cond) {
2828

2929
// most likely we will read from the disk for no reason at all as the caller
3030
// already finished initializing its randomness
31-
if (loop_cond()) break;
31+
if (!loop_cond()) break;
3232

3333
const ENTROPY_AVAIL_PATH = '/proc/sys/kernel/random/entropy_avail';
3434
const entropy_avail = parseInt(await fs.promises.readFile(ENTROPY_AVAIL_PATH, 'utf8'), 10);
@@ -98,7 +98,7 @@ function pick_a_disk(available_disks) {
9898
// (0 index highest priority, n-1 index lowest priority)
9999
// note: we decided on the order according to previous implantation we had in the past
100100
// as it added in patches we might want to reconsider it
101-
const disk_order_by_priority = ['/dev/sd', '/dev/vd', '/dev/xvd', 'dev/dasd', '/dev/nvme'];
101+
const disk_order_by_priority = ['/dev/sd', '/dev/vd', '/dev/xvd', '/dev/dasd', '/dev/nvme'];
102102
const priority_disk_array = [];
103103
for (const disk of available_disks) {
104104
if (disk.size > config.ENTROPY_DISK_SIZE_THRESHOLD) {

0 commit comments

Comments
 (0)