From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#22050: [PATCH v3 1/2] linux-boot: Add make-static-device-nodes. Date: Thu, 14 Dec 2017 11:32:30 +0100 Message-ID: <20171214113230.78990529@scratchpost.org> References: <20171213220445.1056-1-dannym@scratchpost.org> <20171213223240.605-1-dannym@scratchpost.org> <20171213223240.605-2-dannym@scratchpost.org> <87mv2lu1xk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePQp9-00087j-57 for bug-guix@gnu.org; Thu, 14 Dec 2017 05:33:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePQp4-00063v-4I for bug-guix@gnu.org; Thu, 14 Dec 2017 05:33:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:52564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePQp4-00063f-02 for bug-guix@gnu.org; Thu, 14 Dec 2017 05:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ePQp3-0005ne-Nz for bug-guix@gnu.org; Thu, 14 Dec 2017 05:33:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87mv2lu1xk.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 22050@debbugs.gnu.org Hi Ludo, On Thu, 14 Dec 2017 09:52:07 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Hello! >=20 > AIUI this will solve lack of /dev/fuse at startup (among other things), > right? I always wondered why it wasn=E2=80=99t showing up automatically. Yep. (The reason it works in other distros is because there's an executable "sys= temd-tmpfiles" which does what I do in this patch, before udevd is started) > Rather: >=20 > (define (report-system-error . args) > (let ((errno (system-error-errno args))) > (format (current-error-port) "could not create=E2=80=A6: ~a~%" (str= error errno)))) >=20 > (define-syntax-rule (catch-system-error exp) > (catch 'system-error > (lambda () > exp) > report-system-error)) I'd like this to include the file name in the error message. I rather hate= UNIXoid error messages like "mknod: Permission denied" where it doesn't sa= y which arguments mknod had :P > (The term =E2=80=98callback=E2=80=99 is never used in Scheme; we just wri= te =E2=80=98proc=E2=80=99 or > =E2=80=98thunk=E2=80=99.) Oh okay. > Could we read that directly instead of invoking =E2=80=98kmod=E2=80=99? Probably, but it would mean that we'd duplicate kmod and take up maintenanc= e of something extraneous. We could do it - but what does it buy us? > What about having a =E2=80=98static-device-nodes=E2=80=99 procedure that = would parse > that and return a list of , where: >=20 > ;; TYPE is 'char or 'block, MAJOR and MINOR are integers. > (define-record-type > (device-node name type major minor module) > device-node? > =E2=80=A6) >=20 > and then: >=20 > (define create-device-node > (match-lambda > (($ name type major minor) > (mknod =E2=80=A6)))) >=20 > finally: >=20 > (for-each create-device-node (static-device-nodes)) >=20 > ? The kmod format has entries not only for mknod but also for mkdir (it actua= lly mkdirs the same directory twice sometimes which is why there was anothe= r version of this patch...).