From a1f5dfc202f831b5e1cac4fbec9c27ae897c069f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 16 Jan 2019 16:16:24 +0100 Subject: 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(-) (limited to 'guix/build') diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 6f2a061f35..94d335b67c 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) -- cgit v1.2.3