summaryrefslogtreecommitdiff
path: root/guix/build/linux-initrd.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build/linux-initrd.scm')
-rw-r--r--guix/build/linux-initrd.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/build/linux-initrd.scm b/guix/build/linux-initrd.scm
index 274eef7ff3..81f9e46cfb 100644
--- a/guix/build/linux-initrd.scm
+++ b/guix/build/linux-initrd.scm
@@ -23,6 +23,7 @@
linux-command-line
configure-qemu-networking
mount-qemu-smb-share
+ bind-mount
load-linux-module*
device-number))
@@ -92,6 +93,12 @@ Vanilla QEMU's `-smb' option just exports a /qemu share, whereas our
(mount (string-append "//" server share) mount-point "cifs" 0
(string->pointer "guest,sec=none"))))
+(define (bind-mount source target)
+ "Bind-mount SOURCE at TARGET."
+ (define MS_BIND 4096) ; from libc's <sys/mount.h>
+
+ (mount source target "" MS_BIND))
+
(define (load-linux-module* file)
"Load Linux module from FILE, the name of a `.ko' file."
(define (slurp module)