[Top][All Lists]

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

bug#22050: [PATCH v3 1/2] linux-boot: Add make-static-device-nodes.

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

Hi Ludo,

On Thu, 14 Dec 2017 09:52:07 +0100
address@hidden (Ludovic Courtès) wrote:

> Hello!
> AIUI this will solve lack of /dev/fuse at startup (among other things),
> right?  I always wondered why it wasn’t showing up automatically.


(The reason it works in other distros is because there's an executable 
"systemd-tmpfiles" which does what I do in this patch, before udevd is started)

> Rather:
>   (define (report-system-error . args)
>     (let ((errno (system-error-errno args)))
>       (format (current-error-port) "could not create…: ~a~%" (strerror 
> errno))))
>   (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 say 
which arguments mknod had :P

> (The term ‘callback’ is never used in Scheme; we just write ‘proc’ or
> ‘thunk’.)

Oh okay.

> Could we read that directly instead of invoking ‘kmod’?

Probably, but it would mean that we'd duplicate kmod and take up maintenance of 
something extraneous.  We could do it - but what does it buy us?

> What about having a ‘static-device-nodes’ procedure that would parse
> that and return a list of <device-node>, where:
>   ;; TYPE is 'char or 'block, MAJOR and MINOR are integers.
>   (define-record-type <device-node>
>     (device-node name type major minor module)
>     device-node?
>     …)
> and then:
>   (define create-device-node
>     (match-lambda
>       (($ <device-node> name type major minor)
>        (mknod …))))
> finally:
>   (for-each create-device-node (static-device-nodes))
> ?

The kmod format has entries not only for mknod but also for mkdir (it actually 
mkdirs the same directory twice sometimes which is why there was another 
version of this patch...).

reply via email to

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