[Top][All Lists]

[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
 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)
      ((= ret 0)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]