[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
64/68: syscalls: 'device-in-use?' does not create a port.
From: |
guix-commits |
Subject: |
64/68: syscalls: 'device-in-use?' does not create a port. |
Date: |
Thu, 17 Jan 2019 08:05:22 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit a1f5dfc202f831b5e1cac4fbec9c27ae897c069f
Author: Ludovic Courtès <address@hidden>
Date: Wed Jan 16 16:16:24 2019 +0100
syscalls: 'device-in-use?' does not create a port.
* guix/build/syscalls.scm (device-in-use?): Use 'open-fdes' rather than
'open-file'.
---
guix/build/syscalls.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 6f2a061..94d335b 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -693,9 +693,9 @@ mounted at FILE."
from fdisk_device_is_used function of util-linux. This is particulary useful
for devices that do not appear in /proc/self/mounts like overlayfs lowerdir
backend device."
- (let*-values (((port) (open-file device "rb"))
- ((ret err) (%ioctl (fileno port) BLKRRPART %null-pointer)))
- (close-port port)
+ (let*-values (((fd) (open-fdes device O_RDONLY))
+ ((ret err) (%ioctl fd BLKRRPART %null-pointer)))
+ (close-fdes fd)
(cond
((= ret 0)
#f)
- 25/68: installer: Add services page., (continued)
- 25/68: installer: Add services page., guix-commits, 2019/01/17
- 11/68: gnu: installer: Launch the installer as kmscon login-program., guix-commits, 2019/01/17
- 13/68: installer: Move everything to the build side., guix-commits, 2019/01/17
- 15/68: tests: Rename %test-encrypted-os to %test-encrypted-root-os., guix-commits, 2019/01/17
- 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 <=
- 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, 2019/01/17
- 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