diff options
| author | Richard W.M. Jones <rjones@redhat.com> | 2012-11-20 16:20:12 +0000 |
|---|---|---|
| committer | Richard W.M. Jones <rjones@redhat.com> | 2012-11-20 16:34:23 +0000 |
| commit | ca488a6d7b6f5701b63249d5a0c73eada09c432c (patch) | |
| tree | 85eba69be93a141a99b040a27e74ac61ba54c6c8 /lua/examples/create_disk.lua | |
| parent | 8f80f9fdae13a320da978dffa2c9d94e7b68a810 (diff) | |
| download | libguestfs-ca488a6d7b6f5701b63249d5a0c73eada09c432c.tar.gz libguestfs-ca488a6d7b6f5701b63249d5a0c73eada09c432c.tar.xz libguestfs-ca488a6d7b6f5701b63249d5a0c73eada09c432c.zip | |
lua: Various fixes to the bindings (thanks Jerome Vuarand).
See http://article.gmane.org/gmane.comp.lang.lua.general/95065
Note that this is incompatible with existing code. You
have to do:
local G = require "guestfs"
local g = G.create ()
ie. give the module your own name ("G" in that example).
Diffstat (limited to 'lua/examples/create_disk.lua')
| -rw-r--r-- | lua/examples/create_disk.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/examples/create_disk.lua b/lua/examples/create_disk.lua index 2dfc1fc2..c662a2c5 100644 --- a/lua/examples/create_disk.lua +++ b/lua/examples/create_disk.lua @@ -1,10 +1,10 @@ -- Example showing how to create a disk image. -require "guestfs" +local G = require "guestfs" -output = "disk.img" +local output = "disk.img" -g = Guestfs.create () +local g = G.create () -- Create a raw-format sparse disk image, 512 MB in size. file = io.open (output, "w") |
