guix-commits
[Top][All Lists]
Advanced

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

01/04: hurd-boot: Create more PTY nodes.


From: guix-commits
Subject: 01/04: hurd-boot: Create more PTY nodes.
Date: Mon, 28 Nov 2022 05:22:16 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 450f7740283ce160a7482d1c75e6e0ab17f2a6f0
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Nov 27 23:00:12 2022 +0100

    hurd-boot: Create more PTY nodes.
    
    * gnu/build/hurd-boot.scm (set-hurd-device-translators): Create more
    /dev/ptyp* and /dev/ttyp* nodes.
---
 gnu/build/hurd-boot.scm | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index ad3c50d61e..ad8ffccea6 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020-2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -217,24 +217,22 @@ set."
       ("dev/tty3"    ("/hurd/term"     "/dev/tty3" "hurdio" 
"/dev/vcs/3/console")
                                                             #o666)
 
-      ("dev/ptyp0"   ("/hurd/term"     "/dev/ptyp0" "pty-master" "/dev/ttyp0")
-                                                            #o666)
-      ("dev/ptyp1"   ("/hurd/term"     "/dev/ptyp1" "pty-master" "/dev/ttyp1")
-                                                            #o666)
-      ("dev/ptyp2"   ("/hurd/term"     "/dev/ptyp2" "pty-master" "/dev/ttyp2")
-                                                            #o666)
+      ,@(append-map (lambda (n)
+                      (let ((n (number->string n)))
+                        `((,(string-append "dev/ptyp" n)
+                           ("/hurd/term" ,(string-append "/dev/ptyp" n)
+                            "pty-master" ,(string-append "/dev/ttyp" n))
+                           #o666)
 
-      ("dev/ttyp0"   ("/hurd/term"     "/dev/ttyp0" "pty-slave" "/dev/ptyp0")
-                                                            #o666)
-      ("dev/ttyp1"   ("/hurd/term"     "/dev/ttyp1" "pty-slave" "/dev/ptyp1")
-                                                            #o666)
-      ("dev/ttyp2"   ("/hurd/term"     "/dev/ttyp2" "pty-slave" "/dev/ptyp2")
-                                                            #o666)))
+                          (,(string-append "dev/ttyp" n)
+                           ("/hurd/term" ,(string-append "/dev/ttyp" n)
+                            "pty-slave" ,(string-append "/dev/ptyp" n))
+                           #o666))))
+                    (iota 10 0))))
 
   (for-each scope-set-translator servers)
   (mkdir* "dev/vcs/1")
   (mkdir* "dev/vcs/2")
-  (mkdir* "dev/vcs/2")
   (rename-file (scope "dev/console") (scope "dev/console-"))
   (for-each scope-set-translator devices)
 



reply via email to

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