guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

13/21: installer: Replace spawned mount command with the mount syscall.


From: John Darrington
Subject: 13/21: installer: Replace spawned mount command with the mount syscall.
Date: Sat, 31 Dec 2016 14:54:18 +0000 (UTC)

jmd pushed a commit to branch wip-installer
in repository guix.

commit 82630e42fe9fc2aca09e4c4c5759970f7aea532e
Author: John Darrington <address@hidden>
Date:   Fri Dec 30 09:35:48 2016 +0100

    installer: Replace spawned mount command with the mount syscall.
    
    * gnu/system/installer/install.scm (install-page-key-handler): Use the mount
    system call, instead of spawning the mount command.
---
 gnu/system/installer/install.scm |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/system/installer/install.scm b/gnu/system/installer/install.scm
index ceeb960..65e7520 100644
--- a/gnu/system/installer/install.scm
+++ b/gnu/system/installer/install.scm
@@ -27,6 +27,7 @@
   #:use-module (ncurses curses)
   #:use-module (guix store)
   #:use-module (guix utils)
+  #:use-module ((guix build syscalls) #:select (mount umount))
   #:use-module (guix build utils)
 
   #:export (make-install-page))
@@ -37,7 +38,6 @@
                          title
                          install-page-refresh
                          install-page-key-handler)))
-
     page))
 
 
@@ -82,11 +82,10 @@
           (lambda ()
             (and
              (mkdir-p target)
-             (zero? (pipe-cmd window-port "mount"
-                                 "mount" "-t" "ext4" root-device target))
+             (mount root-device target "ext4" #:update-mtab? #f)
 
              (zero? (pipe-cmd window-port  "herd"
-                                 "herd" "start" "cow-store" target))
+                              "herd" "start" "cow-store" target))
 
              (mkdir-p (string-append target "/etc"))
              (or (copy-file config-file
@@ -107,8 +106,9 @@
           (lambda (key subr message args . rest)
             (display-error (stack-ref (make-stack #t) 3)
                            window-port subr message args rest)))
+
         (close-port window-port))))
-     #f))
+    #f))
 
 (define (install-page-refresh page)
   (when (not (page-initialised? page))



reply via email to

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