diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-08-02 17:21:47 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-08-02 17:21:47 +0100 |
commit | 863168467f14e33407c4bf9c7f790bcd4911aea3 (patch) | |
tree | 85742a492a5fda865939294fa3d998b46cf37783 /ruby/examples | |
parent | b3d0cc0588845d3cad3fd67943d93e1bd87b1700 (diff) | |
download | libguestfs-863168467f14e33407c4bf9c7f790bcd4911aea3.tar.gz libguestfs-863168467f14e33407c4bf9c7f790bcd4911aea3.tar.xz libguestfs-863168467f14e33407c4bf9c7f790bcd4911aea3.zip |
examples: Use add_drive_opts function in examples.
In libguestfs 1.20, you will be able to use 'add_drive'
instead of 'add_drive_opts' (except in the C bindings).
However until libguestfs 1.20 is the minimum stable version
people will still be using old versions where you have to use
'add_drive_opts'. This makes the examples confusing.
Therefore continue to use 'add_drive_opts' in the examples
for now.
Diffstat (limited to 'ruby/examples')
-rw-r--r-- | ruby/examples/create_disk.rb | 2 | ||||
-rw-r--r-- | ruby/examples/guestfs-ruby.pod | 4 | ||||
-rw-r--r-- | ruby/examples/inspect_vm.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ruby/examples/create_disk.rb b/ruby/examples/create_disk.rb index fd6ec01e..32fb1171 100644 --- a/ruby/examples/create_disk.rb +++ b/ruby/examples/create_disk.rb @@ -15,7 +15,7 @@ File.open(output, "w") { g.set_trace(1) # Attach the disk image to libguestfs. -g.add_drive(output, :format => "raw") +g.add_drive_opts(output, :format => "raw") # Run the libguestfs back-end. g.launch(); diff --git a/ruby/examples/guestfs-ruby.pod b/ruby/examples/guestfs-ruby.pod index 4b53d018..1af133de 100644 --- a/ruby/examples/guestfs-ruby.pod +++ b/ruby/examples/guestfs-ruby.pod @@ -8,8 +8,8 @@ guestfs-ruby - How to use libguestfs from Ruby require 'guestfs' g = Guestfs::Guestfs.new() - g.add_drive("disk.img", - :readonly => 1, :format => "raw") + g.add_drive_opts("disk.img", + :readonly => 1, :format => "raw") g.launch() =head1 DESCRIPTION diff --git a/ruby/examples/inspect_vm.rb b/ruby/examples/inspect_vm.rb index c29114ea..abf22790 100644 --- a/ruby/examples/inspect_vm.rb +++ b/ruby/examples/inspect_vm.rb @@ -11,7 +11,7 @@ disk = ARGV[0] g = Guestfs::Guestfs.new() # Attach the disk image read-only to libguestfs. -g.add_drive(disk, :readonly => 1) +g.add_drive_opts(disk, :readonly => 1) # Run the libguestfs back-end. g.launch() |