From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cviFN-0008Lc-FN for guix-patches@gnu.org; Wed, 05 Apr 2017 06:33:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cviFK-0006GX-4B for guix-patches@gnu.org; Wed, 05 Apr 2017 06:33:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35002) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cviFK-0006GQ-0w for guix-patches@gnu.org; Wed, 05 Apr 2017 06:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cviFJ-0007fe-RW for guix-patches@gnu.org; Wed, 05 Apr 2017 06:33:01 -0400 Subject: bug#26341: [PATCH] build: vm: Add missing module. Resent-Message-ID: References: <20170402150157.7149-1-m.othacehe@gmail.com> <8760iks5u4.fsf@gnu.org> <86bmsbrvsk.fsf@gmail.com> From: Mathieu Othacehe In-reply-to: <86bmsbrvsk.fsf@gmail.com> Date: Wed, 05 Apr 2017 12:32:30 +0200 Message-ID: <86a87vrvpd.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 26341@debbugs.gnu.org --=-=-= Content-Type: text/plain The attached patch ... Sorry Mathie --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=mount.patch diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 3fa318df3..2de664aa7 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -462,51 +462,51 @@ the returned procedure is called." (define UMOUNT_NOFOLLOW 8) (define mount - (let ((proc (if (module-defined? the-scm-module 'mount) - (module-ref the-scm-module 'mount) - (syscall->procedure int "mount" `(* * * ,unsigned-long *))))) - (lambda* (source target type #:optional (flags 0) options - #:key (update-mtab? #f)) - "Mount device SOURCE on TARGET as a file system TYPE. Optionally, FLAGS + (if (module-defined? the-scm-module 'mount) + (module-ref the-scm-module 'mount) + (let ((proc (syscall->procedure int "mount" `(* * * ,unsigned-long *)))) + (lambda* (source target type #:optional (flags 0) options + #:key (update-mtab? #f)) + "Mount device SOURCE on TARGET as a file system TYPE. Optionally, FLAGS may be a bitwise-or of the MS_* constants, and OPTIONS may be a string. When FLAGS contains MS_REMOUNT, SOURCE and TYPE are ignored. When UPDATE-MTAB? is true, update /etc/mtab. Raise a 'system-error' exception on error." - (let-values (((ret err) - (proc (if source - (string->pointer source) - %null-pointer) - (string->pointer target) - (if type - (string->pointer type) - %null-pointer) - flags - (if options - (string->pointer options) - %null-pointer)))) - (unless (zero? ret) - (throw 'system-error "mount" "mount ~S on ~S: ~A" - (list source target (strerror err)) - (list err))) - (when update-mtab? - (augment-mtab source target type options)))))) + (let-values (((ret err) + (proc (if source + (string->pointer source) + %null-pointer) + (string->pointer target) + (if type + (string->pointer type) + %null-pointer) + flags + (if options + (string->pointer options) + %null-pointer)))) + (unless (zero? ret) + (throw 'system-error "mount" "mount ~S on ~S: ~A" + (list source target (strerror err)) + (list err))) + (when update-mtab? + (augment-mtab source target type options))))))) (define umount - (let ((proc (if (module-defined? the-scm-module 'umount) - (module-ref the-scm-module 'umount) - (syscall->procedure int "umount2" `(* ,int))))) - (lambda* (target #:optional (flags 0) - #:key (update-mtab? #f)) - "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* + (if (module-defined? the-scm-module 'umount) + (module-ref the-scm-module 'umount) + (let ((proc (syscall->procedure int "umount2" `(* ,int)))) + (lambda* (target #:optional (flags 0) + #:key (update-mtab? #f)) + "Unmount TARGET. Optionally FLAGS may be one of the MNT_* or UMOUNT_* constants from ." - (let-values (((ret err) - (proc (string->pointer target) flags))) - (unless (zero? ret) - (throw 'system-error "umount" "~S: ~A" - (list target (strerror err)) - (list err))) - (when update-mtab? - (remove-from-mtab target)))))) + (let-values (((ret err) + (proc (string->pointer target) flags))) + (unless (zero? ret) + (throw 'system-error "umount" "~S: ~A" + (list target (strerror err)) + (list err))) + (when update-mtab? + (remove-from-mtab target))))))) (define (mount-points) "Return the mounts points for currently mounted file systems." --=-=-= Content-Type: text/plain u --=-=-=--