mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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.
This commit is contained in:
@@ -16,7 +16,7 @@ f.close ()
|
||||
g.set_trace (1)
|
||||
|
||||
# Attach the disk image to libguestfs.
|
||||
g.add_drive (output, format = "raw", readonly = 0)
|
||||
g.add_drive_opts (output, format = "raw", readonly = 0)
|
||||
|
||||
# Run the libguestfs back-end.
|
||||
g.launch ()
|
||||
|
||||
@@ -8,7 +8,7 @@ guestfs-python - How to use libguestfs from Python
|
||||
|
||||
import guestfs
|
||||
g = guestfs.GuestFS ()
|
||||
g.add_drive ("disk.img", format="raw", readonly=1)
|
||||
g.add_drive_opts ("disk.img", format="raw", readonly=1)
|
||||
g.launch ()
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -9,7 +9,7 @@ disk = sys.argv[1]
|
||||
g = guestfs.GuestFS ()
|
||||
|
||||
# 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 ()
|
||||
|
||||
Reference in New Issue
Block a user