From ca488a6d7b6f5701b63249d5a0c73eada09c432c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 20 Nov 2012 16:20:12 +0000 Subject: 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). --- lua/examples/create_disk.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua/examples/create_disk.lua') 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") -- cgit