From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYrKC-0002QG-7g for guix-patches@gnu.org; Tue, 09 Jan 2018 05:40:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYrK6-000531-Hz for guix-patches@gnu.org; Tue, 09 Jan 2018 05:40:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:33454) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYrK6-00052n-Ev for guix-patches@gnu.org; Tue, 09 Jan 2018 05:40:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eYrK6-0002XX-8P for guix-patches@gnu.org; Tue, 09 Jan 2018 05:40:02 -0500 Subject: [bug#29932] [PATCH 0/2] Clean up operating-system-kernel-arguments. Resent-Message-ID: Date: Tue, 9 Jan 2018 11:39:54 +0100 From: Danny Milosavljevic Message-ID: <20180109113954.530505c0@scratchpost.org> In-Reply-To: <878td8k8f5.fsf@gnu.org> References: <20180101132200.26157-1-dannym@scratchpost.org> <878td8k8f5.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: 29932@debbugs.gnu.org > It=E2=80=99d feel more idiomatic to me if, instead, we had an > =E2=80=98operating-system-boot-kernel-arguments=E2=80=99 procedure that t= akes an OS and > returns (list --root --system =E2=80=A6). Then it=E2=80=99d be up to the= caller to > append that to what =E2=80=98operating-system-kernel-arguments=E2=80=99 r= eturns. We could also do that... Note that bootable-kernel-arguments is also used by this: (define (read-boot-parameters-file system) "Read boot parameters from SYSTEM's (system or generation) \"parameters\" file and returns the corresponding object or #f if the format is unrecognized. The object has its kernel-arguments extended in order to make it bootable." (let* ((file (string-append system "/parameters")) (params (call-with-input-file file read-boot-parameters)) (root (boot-parameters-root-device params)) (kernel-arguments (boot-parameters-kernel-arguments params))) (if params (boot-parameters (inherit params) (kernel-arguments (bootable-kernel-arguments kernel-arguments system root))) #f))) Which is used by the ./guix/scripts/system.scm generation lister etc (that = is, they have the derivations already).