(* Block devices are empty and no filesystems are mounted. *)
| InitEmpty
+ (* /dev/sda contains a single partition /dev/sda1, with random
+ * content. /dev/sdb and /dev/sdc may have random content.
+ * No LVM.
+ *)
+ | InitPartition
+
(* /dev/sda contains a single partition /dev/sda1, which is formatted
* as ext2, empty [except for lost+found] and mounted on /.
* /dev/sdb and /dev/sdc may have random content.
attaches it as a device.");
("swapon_device", (RErr, [String "device"]), 170, [],
- [InitNone, Always, TestRun (
- [["mkswap"; "/dev/sdb"];
- ["swapon_device"; "/dev/sdb"];
- ["swapoff_device"; "/dev/sdb"]])],
+ [InitPartition, Always, TestRun (
+ [["mkswap"; "/dev/sda1"];
+ ["swapon_device"; "/dev/sda1"];
+ ["swapoff_device"; "/dev/sda1"]])],
"enable swap on device",
"\
This command enables the libguestfs appliance to use the
[["blockdev_setrw"; "/dev/sda"];
["umount_all"];
["lvm_remove_all"]]
+ | InitPartition ->
+ pr " /* InitPartition for %s: create /dev/sda1 */\n" test_name;
+ List.iter (generate_test_command_call test_name)
+ [["blockdev_setrw"; "/dev/sda"];
+ ["umount_all"];
+ ["lvm_remove_all"];
+ ["sfdiskM"; "/dev/sda"; ","]]
| InitBasicFS ->
pr " /* InitBasicFS for %s: create ext2 on /dev/sda1 */\n" test_name;
List.iter (generate_test_command_call test_name)
pr " guestfs_free_%s_list (r);\n" typ;
pr " return jr;\n"
+and generate_java_makefile_inc () =
+ generate_header HashStyle GPLv2;
+
+ pr "java_built_sources = \\\n";
+ List.iter (
+ fun (typ, jtyp) ->
+ pr "\tcom/redhat/et/libguestfs/%s.java \\\n" jtyp;
+ ) java_structs;
+ pr "\tcom/redhat/et/libguestfs/GuestFS.java\n"
+
and generate_haskell_hs () =
generate_header HaskellStyle LGPLv2;
) java_structs;
let close = output_to "java/Makefile.inc" in
- pr "java_built_sources =";
- List.iter (
- fun (typ, jtyp) ->
- pr " com/redhat/et/libguestfs/%s.java" jtyp;
- ) java_structs;
- pr " com/redhat/et/libguestfs/GuestFS.java\n";
+ generate_java_makefile_inc ();
close ();
let close = output_to "java/com_redhat_et_libguestfs_GuestFS.c" in