Browse Source

syscalls: 'device-in-use?' returns #f upon EINVAL.

This mirrors the behavior of the 'fdisk_device_is_used' function of
util-linux.

* guix/build/syscalls.scm (device-in-use?): Return #f upon EINVAL.
install-doc-overhaul
Ludovic Courtès 3 years ago
parent
commit
077589459c
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
  1. 5
      guix/build/syscalls.scm

5
guix/build/syscalls.scm

@ -701,6 +701,11 @@ backend device."
#f)
((= err EBUSY)
#t)
((= err EINVAL)
;; We get EINVAL for devices that have the GENHD_FL_NO_PART_SCAN flag
;; set in the kernel, in particular loopback devices, though we do seem
;; to get it for SCSI storage (/dev/sr0) on QEMU.
#f)
(else
(throw 'system-error "ioctl" "~A"
(list (strerror err))

Loading…
Cancel
Save