From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: GuixSD bootable ISO-9669 image
Date: Tue, 6 Jun 2017 11:35:19 +0200 [thread overview]
Message-ID: <20170606113519.7c7bf656@scratchpost.org> (raw)
In-Reply-To: <874lwlb3tj.fsf@gnu.org>
On Tue, 16 May 2017 10:31:36 +0200
ludo@gnu.org (Ludovic Courtès) wrote:
> Honestly, I was under the assumptions that DCE UUIDs was all that
> mattered: it works for ext2 and btrfs, right? I would think that people
> would rarely add FAT32 or ISO9660 UUIDs to the OS config.
With UEFI I thought that everyone has at least one FAT32 UUID in the OS config?
What's more, just by checking /dev/disk/by-uuid the user wouldn't know what kind of filesystem it is. But he had to specify the file system type in the config anyway - so it would be no worse than before. Okay then.
What do you all think of the following?
(define %iso9660-uuid-rx
;; Y m d H M S ss
(make-regexp "^([[:digit:]]{4})-([[:digit:]]{2})-([[:digit:]]{2})-([[:digit:]]{2})-([[:digit:]]{2})-([[:digit:]]{2})-([[:digit:]]{2})$"))
(define (string->iso9660-uuid str)
"Parse STR as a ISO9660 UUID (which is really a timestamp - see /dev/disk/by-uuid).
Return its contents as a 16-byte bytevector. Return #f if STR is not a valid
ISO9660 UUID representation."
(and=> (regexp-exec %iso9660-uuid-rx str)
(lambda (match)
(letrec-syntax ((match-numeral
(syntax-rules ()
((_ index)
(match:substring match index)))))
(let ((year (match-numeral 1))
(month (match-numeral 2))
(day (match-numeral 3))
(hour (match-numeral 4))
(minute (match-numeral 5))
(second (match-numeral 6))
(hundredths (match-numeral 7)))
(string->utf8 (string-append year
month
day
hour
minute
second
hundredths)))))))
And also:
(define string->btrfs-uuid string->uid)
(define string->ext2-uuid string->uid)
(define string->ext3-uuid string->uid)
...
next prev parent reply other threads:[~2017-06-06 9:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 14:17 GuixSD on servers [Fwd: [rtracker.1984.is #131647] A question about VServer system specific requirements] ng0
2017-04-18 15:16 ` Chris Marusich
2017-04-19 20:59 ` Ludovic Courtès
2017-04-23 4:52 ` Chris Marusich
2017-04-24 5:11 ` GuixSD bootable ISO-9669 image (was: Re: GuixSD on servers [Fwd: [rtracker.1984.is #131647] A question about VServer system specific requirements]) Chris Marusich
2017-04-27 13:42 ` GuixSD bootable ISO-9669 image Ludovic Courtès
2017-04-27 17:08 ` GuixSD bootable ISO-9669 image (was: Re: GuixSD on servers [Fwd: [rtracker.1984.is #131647] A question about VServer system specific requirements]) Danny Milosavljevic
2017-04-27 20:00 ` Danny Milosavljevic
2017-04-28 8:18 ` Danny Milosavljevic
2017-05-02 12:37 ` GuixSD bootable ISO-9669 image Ludovic Courtès
2017-05-02 12:53 ` ng0
2017-05-03 6:26 ` Mark H Weaver
2017-05-02 20:09 ` Danny Milosavljevic
2017-05-02 21:11 ` Ludovic Courtès
2017-05-07 19:37 ` Danny Milosavljevic
2017-05-08 14:14 ` Ludovic Courtès
2017-05-11 23:30 ` Danny Milosavljevic
2017-05-12 15:33 ` Ludovic Courtès
2017-05-14 21:25 ` Danny Milosavljevic
2017-05-16 8:31 ` Ludovic Courtès
2017-06-06 9:35 ` Danny Milosavljevic [this message]
2017-06-08 12:25 ` Ludovic Courtès
2017-05-02 20:12 ` Danny Milosavljevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170606113519.7c7bf656@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).