BuildSystem: Only use kvm if user has rw access

This commit is contained in:
2024-05-24 11:09:04 +03:00
parent cc2cc2849e
commit 7db7cfe20f

View File

@@ -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