From 7db7cfe20fc7739adad93087cca803f53c3f1a83 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 24 May 2024 11:09:04 +0300 Subject: [PATCH] BuildSystem: Only use kvm if user has rw access --- script/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/build.sh b/script/build.sh index 3e8eae2ff8..eb0c2ad2f7 100755 --- a/script/build.sh +++ b/script/build.sh @@ -61,7 +61,11 @@ run_bochs () { } if [[ -c /dev/kvm ]]; then - QEMU_ACCEL="-accel kvm" + if [[ -r /dev/kvm ]] && [[ -w /dev/kvm ]]; then + QEMU_ACCEL="-accel kvm" + else + echo "You don't have read/write permissions for /dev/kvm" >&2 + fi fi if [[ $# -eq 0 ]]; then