X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fgenerator.ml;h=e3293d1de44277fd051b57926bc9a8669e91e64e;hb=7d41d75c1d4e6dbe61f6cd353bc104663340483f;hp=47db5d9f55f0376603602a441646903ba2b2f9cf;hpb=c66f3600cd76c7fe0e318004c416f7845b934bc6;p=libguestfs.git diff --git a/src/generator.ml b/src/generator.ml index 47db5d9..e3293d1 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -24,8 +24,10 @@ * this one to describe the interface (see the big table below), and * daemon/.c to write the implementation. * - * After editing this file, run it (./src/generator.ml) to regenerate - * all the output files. + * After editing this file, run it (./src/generator.ml) to regenerate all the + * output files. Note that if you are using a separate build directory you must + * run generator.ml from your top level build directory. You must also have run + * configure before generator.ml will run. * * IMPORTANT: This script should NOT print any warnings. If it prints * warnings, you should treat them as errors. @@ -1716,8 +1718,8 @@ This uses the L command."); ("upload", (RErr, [FileIn "filename"; String "remotefilename"]), 66, [], [InitBasicFS, Always, TestOutput ( (* Pick a file from cwd which isn't likely to change. *) - [["upload"; "../COPYING.LIB"; "/COPYING.LIB"]; - ["checksum"; "md5"; "/COPYING.LIB"]], "e3eda01d9815f8d24aae2dbd89b68b06")], + [["upload"; "../COPYING.LIB"; "/COPYING.LIB"]; + ["checksum"; "md5"; "/COPYING.LIB"]], "e3eda01d9815f8d24aae2dbd89b68b06")], "upload a file from the local machine", "\ Upload local file C to C on the @@ -1730,10 +1732,10 @@ See also C."); ("download", (RErr, [String "remotefilename"; FileOut "filename"]), 67, [], [InitBasicFS, Always, TestOutput ( (* Pick a file from cwd which isn't likely to change. *) - [["upload"; "../COPYING.LIB"; "/COPYING.LIB"]; - ["download"; "/COPYING.LIB"; "testdownload.tmp"]; - ["upload"; "testdownload.tmp"; "/upload"]; - ["checksum"; "md5"; "/upload"]], "e3eda01d9815f8d24aae2dbd89b68b06")], + [["upload"; "../COPYING.LIB"; "/COPYING.LIB"]; + ["download"; "/COPYING.LIB"; "testdownload.tmp"]; + ["upload"; "testdownload.tmp"; "/upload"]; + ["checksum"; "md5"; "/upload"]], "e3eda01d9815f8d24aae2dbd89b68b06")], "download a file to the local machine", "\ Download file C and save it as C @@ -2355,19 +2357,19 @@ are activated or deactivated."); ("lvresize", (RErr, [String "device"; Int "mbytes"]), 105, [], [InitNone, Always, TestOutput ( - [["sfdiskM"; "/dev/sda"; ","]; - ["pvcreate"; "/dev/sda1"]; - ["vgcreate"; "VG"; "/dev/sda1"]; - ["lvcreate"; "LV"; "VG"; "10"]; - ["mkfs"; "ext2"; "/dev/VG/LV"]; - ["mount"; "/dev/VG/LV"; "/"]; - ["write_file"; "/new"; "test content"; "0"]; - ["umount"; "/"]; - ["lvresize"; "/dev/VG/LV"; "20"]; - ["e2fsck_f"; "/dev/VG/LV"]; - ["resize2fs"; "/dev/VG/LV"]; - ["mount"; "/dev/VG/LV"; "/"]; - ["cat"; "/new"]], "test content")], + [["sfdiskM"; "/dev/sda"; ","]; + ["pvcreate"; "/dev/sda1"]; + ["vgcreate"; "VG"; "/dev/sda1"]; + ["lvcreate"; "LV"; "VG"; "10"]; + ["mkfs"; "ext2"; "/dev/VG/LV"]; + ["mount"; "/dev/VG/LV"; "/"]; + ["write_file"; "/new"; "test content"; "0"]; + ["umount"; "/"]; + ["lvresize"; "/dev/VG/LV"; "20"]; + ["e2fsck_f"; "/dev/VG/LV"]; + ["resize2fs"; "/dev/VG/LV"]; + ["mount"; "/dev/VG/LV"; "/"]; + ["cat"; "/new"]], "test content")], "resize an LVM logical volume", "\ This resizes (expands or shrinks) an existing LVM logical @@ -2439,7 +2441,7 @@ This command is only needed because of C ("sleep", (RErr, [Int "secs"]), 109, [], [InitNone, Always, TestRun ( - [["sleep"; "1"]])], + [["sleep"; "1"]])], "sleep for some seconds", "\ Sleep for C seconds."); @@ -2855,6 +2857,17 @@ were rarely if ever used anyway. See also C and the L manpage."); + ("zfile", (RString "description", [String "method"; String "path"]), 140, [], + [], + "determine file type inside a compressed file", + "\ +This command runs C after first decompressing C +using C. + +C must be one of C, C or C. + +See also: C"); + ] let all_functions = non_daemon_functions @ daemon_functions @@ -8212,7 +8225,7 @@ let output_to filename = let () = check_functions (); - if not (Sys.file_exists "HACKING") then ( + if not (Sys.file_exists "config.status") then ( eprintf "\ You are probably running this from the wrong directory. Run it from the top source directory using the command @@ -8338,6 +8351,15 @@ Run it from the top source directory using the command close (); ) 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"; + close (); + let close = output_to "java/com_redhat_et_libguestfs_GuestFS.c" in generate_java_c (); close ();