qemu-devel
[Top][All Lists]
Advanced

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

Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration


From: Javier Guerra
Subject: Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration file
Date: Wed, 14 May 2008 09:45:02 -0500

What about Lua?  (http://www.lua.org)

it started up as a configuration language, and evolved into a full
programming language, while remaining _very_ light (less than 200K
with all libraries), and wonderfully easy to embed into C programs.

it lets you write things like:

drives = {
  hda = {if='scsi', file='hda.img'},
  hdb = {if='ide', file='hdb.img'},
}
mem = 512*MB

or, equivalently:

drives={}
drives.hda={}
drives.hda.if='scsi'
drives.hda.file='hda.img'
drives.hdb={}
drives.hdb.if='ide'
drives.hdb.file='hdb.img'
mem=512*MB

or, if you want:

drive {if='scsi', file='hda.img'}
drive {if='ide', file='hdb.img'}
mem(512*MB)

or even:

for img in lfs.dir("*.img") do
   drive{if='scsi', file=img}
end



-- 
Javier




reply via email to

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