BuildSystem: Only use kvm if user has rw access

This commit is contained in:
Bananymous 2024-05-24 11:09:04 +03:00
parent cc2cc2849e
commit 7db7cfe20f
1 changed files with 5 additions and 1 deletions

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