guix-patches
[Top][All Lists]
Advanced

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

bug#41961: [PATCH 1/1] services: childhurd: Support more than one instan


From: Jan Nieuwenhuizen
Subject: bug#41961: [PATCH 1/1] services: childhurd: Support more than one instance.
Date: Sun, 21 Jun 2020 12:55:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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





reply via email to

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