mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
generator: Rename 'add_drive_opts' API to 'add_drive'.
By using the once_had_no_optargs flag, this change is backwards compatible for callers (except Haskell, PHP and GObject as discussed in earlier commit).
This commit is contained in:
@@ -29,7 +29,7 @@ public class CreateDisk
|
||||
put ("readonly", Boolean.FALSE);
|
||||
}
|
||||
};
|
||||
g.add_drive_opts (output, optargs);
|
||||
g.add_drive (output, optargs);
|
||||
|
||||
// Run the libguestfs back-end.
|
||||
g.launch ();
|
||||
|
||||
@@ -35,7 +35,7 @@ public class InspectVM
|
||||
}
|
||||
};
|
||||
|
||||
g.add_drive_opts (disk, optargs);
|
||||
g.add_drive (disk, optargs);
|
||||
|
||||
// Run the libguestfs back-end.
|
||||
g.launch ();
|
||||
|
||||
@@ -9,7 +9,7 @@ guestfs-java - How to use libguestfs from Java
|
||||
import com.redhat.et.libguestfs.*;
|
||||
|
||||
GuestFS g = new GuestFS ();
|
||||
g.add_drive_opts ("disk.img");
|
||||
g.add_drive ("disk.img");
|
||||
g.launch ();
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -27,7 +27,7 @@ public class GuestFS080OptArgs
|
||||
try {
|
||||
GuestFS g = new GuestFS ();
|
||||
|
||||
g.add_drive_opts ("/dev/null");
|
||||
g.add_drive ("/dev/null");
|
||||
|
||||
HashMap<String,Object> optargs;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class GuestFS080OptArgs
|
||||
put ("readonly", Boolean.TRUE);
|
||||
}
|
||||
};
|
||||
g.add_drive_opts ("/dev/null", optargs);
|
||||
g.add_drive ("/dev/null", optargs);
|
||||
|
||||
optargs = new HashMap<String,Object>() {
|
||||
{
|
||||
@@ -44,7 +44,7 @@ public class GuestFS080OptArgs
|
||||
put ("format", "raw");
|
||||
}
|
||||
};
|
||||
g.add_drive_opts ("/dev/null", optargs);
|
||||
g.add_drive ("/dev/null", optargs);
|
||||
|
||||
optargs = new HashMap<String,Object>() {
|
||||
{
|
||||
@@ -53,7 +53,7 @@ public class GuestFS080OptArgs
|
||||
put ("iface", "virtio");
|
||||
}
|
||||
};
|
||||
g.add_drive_opts ("/dev/null", optargs);
|
||||
g.add_drive ("/dev/null", optargs);
|
||||
}
|
||||
catch (Exception exn) {
|
||||
System.err.println (exn);
|
||||
|
||||
Reference in New Issue
Block a user