From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: rekado@elephly.net, 41961-done@debbugs.gnu.org
Subject: bug#41961: [PATCH 1/1] services: childhurd: Support more than one instance.
Date: Sun, 21 Jun 2020 12:55:27 +0200 [thread overview]
Message-ID: <87wo40zo0w.fsf@gnu.org> (raw)
In-Reply-To: <87pn9s4utp.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 21 Jun 2020 11:44:18 +0200")
Mathieu Othacehe writes:
>> Hmm...yes, this looked a bit awkward to me too. It's being used like
>> this:
>>
>> o--8<---------------cut here---------------start------------->8---
>> (let ((image (hurd-vm-configuration-image config))
>> ...)
>> (define vm-command
>> #~(list
>> (string-append #$qemu "/bin/qemu-system-i386")
>> #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '())
>> "-m" (number->string #$memory-size)
>> #$@net-options
>> #$@options
>> #+image))
>
> What about having something like:
>
> (define vm-command
> #~(list
> (string-append #$qemu "/bin/qemu-system-i386")
> #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '())
> "-m" (number->string #$memory-size)
> #$@options
> #+@(list "--hda" image)))
>
> instead?
So we hardcode it. Simply changed to
--8<---------------cut here---------------start------------->8---
(define vm-command
#~(list
(string-append #$qemu "/bin/qemu-system-i386")
#$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '())
"-m" (number->string #$memory-size)
#$@net-options
#$@options
"--hda" #+image))
--8<---------------cut here---------------end--------------->8---
I guess that's better than the original fragile softcoding, because it's
more robust and we have no usecase for changing '--hda' yet. Maybe I'm
a bit too inclined to always enable the user to override stuff, even if
I cannot imagine its use case yet :-)
Pushed to master as, b7249aa4726193653e05e694ec4bb311aa4ec6c2.
Thanks,
Janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
prev parent reply other threads:[~2020-06-21 10:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-20 9:16 [bug#41961] [PATCH 0/1] services: childhurd: Support more than one instance Jan (janneke) Nieuwenhuizen
2020-06-20 9:19 ` [bug#41961] [PATCH 1/1] " Jan (janneke) Nieuwenhuizen
2020-06-21 8:37 ` Mathieu Othacehe
2020-06-21 9:06 ` Jan Nieuwenhuizen
2020-06-21 9:44 ` Mathieu Othacehe
2020-06-21 10:55 ` Jan Nieuwenhuizen [this message]
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=87wo40zo0w.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=41961-done@debbugs.gnu.org \
--cc=othacehe@gnu.org \
--cc=rekado@elephly.net \
/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).