GNU bug report logs - #41011
[PATCH] gnu: grub: Support for network boot via tftp/nfs.

Previous Next

Package: guix-patches;

Reported by: Stefan <stefan-guix <at> vodafonemail.de>

Date: Fri, 1 May 2020 20:33:02 UTC

Severity: normal

Tags: patch

Done: Stefan <stefan-guix <at> vodafonemail.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Stefan <stefan-guix <at> vodafonemail.de>, 41011 <at> debbugs.gnu.org
Subject: [bug#41011] [PATCH] gnu: grub: Support for network boot via tftp/nfs.
Date: Sun, 14 Jun 2020 14:56:23 -0400
Hello Danny,

Danny Milosavljevic <dannym <at> scratchpost.org> writes:

> Hi Maxim,
> Hi Stefan,
>
> On Thu, 11 Jun 2020 00:21:11 -0400
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:
>
>> >   (define (device-string->file-system-device device-string)
>> >     ;; The "--root=SPEC" kernel command-line option always provides a
>> >     ;; string, but the string can represent a device, a UUID, a
>> >     ;; label or a NFS spec.  So check for all three.
>> >     (cond ((string-prefix? "/" device-string) device-string)
>> >           ((uuid device-string) => identity)
>> >           (else (file-system-label device-string))))
>> >
>> > But looking at the condition (uuid device-string) I have no idea what that means,
>> > or is bound to!  
>> 
>> It means that if the device-string (a string as its name imply) contains
>> something that represent a UUID, return its corresponding UUID object.
>> `uuid' comes from (gnu system uuid).  Does that answer your question?
>
> Oh!  I've looked at now it but I still don't get it.

Perhaps the '=>' syntax is the reason why? The the Guile Reference info
manual defines it as such:

     For the ‘=>’ clause type, EXPRESSION is
     evaluated and the resulting procedure is applied to the value of
     TEST.  The result of this procedure application is then the result
     of the ‘cond’-expression.

(uuid device-string) returns either #f or a uuid object.  So applying
the identity function to a uuid object yields that same object.

HTH!

Maxim




This bug report was last modified 4 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.