[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
65/68: syscalls: 'device-in-use?' returns #f upon EINVAL.
From: |
guix-commits |
Subject: |
65/68: syscalls: 'device-in-use?' returns #f upon EINVAL. |
Date: |
Thu, 17 Jan 2019 08:05:22 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 077589459c1c3ce4cb690447d82b75a46712f896
Author: Ludovic Courtès <address@hidden>
Date: Wed Jan 16 17:43:52 2019 +0100
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.
---
guix/build/syscalls.scm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 94d335b..66d63a2 100644
--- a/guix/build/syscalls.scm
+++ b/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))
- 17/68: services: herd: Allow to pass arguments to start-service., (continued)
- 17/68: services: herd: Allow to pass arguments to start-service., guix-commits, 2019/01/17
- 19/68: gnu: Add guile-parted., guix-commits, 2019/01/17
- 16/68: build: syscalls: Add device-in-use?., guix-commits, 2019/01/17
- 18/68: gnu: guile-newt: Update to revision 4., guix-commits, 2019/01/17
- 62/68: installer: keymap: Put English layout and international variant ahead., guix-commits, 2019/01/17
- 12/68: installer: Rewrite welcome page., guix-commits, 2019/01/17
- 64/68: syscalls: 'device-in-use?' does not create a port., guix-commits, 2019/01/17
- 14/68: installer: Fix locale installation., guix-commits, 2019/01/17
- 68/68: installer: Fix manual partitioning., guix-commits, 2019/01/17
- 66/68: installer: Adjust messages on the final page., guix-commits, 2019/01/17
- 65/68: syscalls: 'device-in-use?' returns #f upon EINVAL.,
guix-commits <=
- 67/68: installer: "formating" → "formatting"., guix-commits, 2019/01/17
- 63/68: installer: partition: Add encryption password confirmation., guix-commits, 2019/01/17
- 03/68: services: kmscon: Remove virtual-terminal requirement., guix-commits, 2019/01/17
- 04/68: gnu: kmscon: Add runtime keymap update support., guix-commits, 2019/01/17
- 02/68: guile: newt: Update revision to 3., guix-commits, 2019/01/17
- 01/68: gnu: Add ghc-tldr., guix-commits, 2019/01/17
- 21/68: installer: Remove "selection" from all titles., guix-commits, 2019/01/17
- 20/68: file-systems: Export read-partition-label and read-partition-uuid., guix-commits, 2019/01/17
- 22/68: installer: Add new utils., guix-commits, 2019/01/17
- 33/68: installer: Reorder POTFILES.in, guix-commits, 2019/01/17