X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=ocaml%2Fguestfs.mli;h=5cab5887bf6e6365586b5a64dd7e9d3d405fb093;hp=e6f5231e1e151be1a0448d5e886a3f5096901195;hb=0884d8bbae6d76a603ec1385ada2938f88981c5c;hpb=ad5abc8d367c9c410051062cae066b1b141b4c76 diff --git a/ocaml/guestfs.mli b/ocaml/guestfs.mli index e6f5231..5cab588 100644 --- a/ocaml/guestfs.mli +++ b/ocaml/guestfs.mli @@ -124,6 +124,87 @@ type statvfs = { namemax : int64; } +val test0 : t -> string -> string option -> string array -> bool -> int -> string -> string -> unit +(** internal test function - do not use *) + +val test0rint : t -> string -> int +(** internal test function - do not use *) + +val test0rinterr : t -> int +(** internal test function - do not use *) + +val test0rint64 : t -> string -> int64 +(** internal test function - do not use *) + +val test0rint64err : t -> int64 +(** internal test function - do not use *) + +val test0rbool : t -> string -> bool +(** internal test function - do not use *) + +val test0rboolerr : t -> bool +(** internal test function - do not use *) + +val test0rconststring : t -> string -> string +(** internal test function - do not use *) + +val test0rconststringerr : t -> string +(** internal test function - do not use *) + +val test0rstring : t -> string -> string +(** internal test function - do not use *) + +val test0rstringerr : t -> string +(** internal test function - do not use *) + +val test0rstringlist : t -> string -> string array +(** internal test function - do not use *) + +val test0rstringlisterr : t -> string array +(** internal test function - do not use *) + +val test0rintbool : t -> string -> int * bool +(** internal test function - do not use *) + +val test0rintboolerr : t -> int * bool +(** internal test function - do not use *) + +val test0rpvlist : t -> string -> lvm_pv array +(** internal test function - do not use *) + +val test0rpvlisterr : t -> lvm_pv array +(** internal test function - do not use *) + +val test0rvglist : t -> string -> lvm_vg array +(** internal test function - do not use *) + +val test0rvglisterr : t -> lvm_vg array +(** internal test function - do not use *) + +val test0rlvlist : t -> string -> lvm_lv array +(** internal test function - do not use *) + +val test0rlvlisterr : t -> lvm_lv array +(** internal test function - do not use *) + +val test0rstat : t -> string -> stat +(** internal test function - do not use *) + +val test0rstaterr : t -> stat +(** internal test function - do not use *) + +val test0rstatvfs : t -> string -> statvfs +(** internal test function - do not use *) + +val test0rstatvfserr : t -> statvfs +(** internal test function - do not use *) + +val test0rhashtable : t -> string -> (string * string) list +(** internal test function - do not use *) + +val test0rhashtableerr : t -> (string * string) list +(** internal test function - do not use *) + val launch : t -> unit (** launch the qemu subprocess *) @@ -139,15 +220,30 @@ val add_drive : t -> string -> unit val add_cdrom : t -> string -> unit (** add a CD-ROM disk image to examine *) +val add_drive_ro : t -> string -> unit +(** add a drive in snapshot mode (read-only) *) + val config : t -> string -> string option -> unit (** add qemu parameters *) +val set_qemu : t -> string -> unit +(** set the qemu binary *) + +val get_qemu : t -> string +(** get the qemu binary *) + val set_path : t -> string -> unit (** set the search path *) val get_path : t -> string (** get the search path *) +val set_append : t -> string -> unit +(** add options to kernel command line *) + +val get_append : t -> string +(** get the additional kernel options *) + val set_autosync : t -> bool -> unit (** set autosync mode *) @@ -160,6 +256,36 @@ val set_verbose : t -> bool -> unit val get_verbose : t -> bool (** get verbose mode *) +val is_ready : t -> bool +(** is ready to accept commands *) + +val is_config : t -> bool +(** is in configuration state *) + +val is_launching : t -> bool +(** is launching subprocess *) + +val is_busy : t -> bool +(** is busy processing a command *) + +val get_state : t -> int +(** get the current state *) + +val set_busy : t -> unit +(** set state to busy *) + +val set_ready : t -> unit +(** set state to ready *) + +val end_busy : t -> unit +(** leave the busy state *) + +val set_memsize : t -> int -> unit +(** set memory allocated to the qemu subprocess *) + +val get_memsize : t -> int +(** get memory allocated to the qemu subprocess *) + val mount : t -> string -> string -> unit (** mount a guest disk at a position in the filesystem *) @@ -323,5 +449,251 @@ val statvfs : t -> string -> statvfs (** get file system statistics *) val tune2fs_l : t -> string -> (string * string) list -(** get ext2/ext3 superblock details *) +(** get ext2/ext3/ext4 superblock details *) + +val blockdev_setro : t -> string -> unit +(** set block device to read-only *) + +val blockdev_setrw : t -> string -> unit +(** set block device to read-write *) + +val blockdev_getro : t -> string -> bool +(** is block device set to read-only *) + +val blockdev_getss : t -> string -> int +(** get sectorsize of block device *) + +val blockdev_getbsz : t -> string -> int +(** get blocksize of block device *) + +val blockdev_setbsz : t -> string -> int -> unit +(** set blocksize of block device *) + +val blockdev_getsz : t -> string -> int64 +(** get total size of device in 512-byte sectors *) + +val blockdev_getsize64 : t -> string -> int64 +(** get total size of device in bytes *) + +val blockdev_flushbufs : t -> string -> unit +(** flush device buffers *) + +val blockdev_rereadpt : t -> string -> unit +(** reread partition table *) + +val upload : t -> string -> string -> unit +(** upload a file from the local machine *) + +val download : t -> string -> string -> unit +(** download a file to the local machine *) + +val checksum : t -> string -> string -> string +(** compute MD5, SHAx or CRC checksum of file *) + +val tar_in : t -> string -> string -> unit +(** unpack tarfile to directory *) + +val tar_out : t -> string -> string -> unit +(** pack directory into tarfile *) + +val tgz_in : t -> string -> string -> unit +(** unpack compressed tarball to directory *) + +val tgz_out : t -> string -> string -> unit +(** pack directory into compressed tarball *) + +val mount_ro : t -> string -> string -> unit +(** mount a guest disk, read-only *) + +val mount_options : t -> string -> string -> string -> unit +(** mount a guest disk with mount options *) + +val mount_vfs : t -> string -> string -> string -> string -> unit +(** mount a guest disk with mount options and vfstype *) + +val debug : t -> string -> string array -> string +(** debugging and internals *) + +val lvremove : t -> string -> unit +(** remove an LVM logical volume *) + +val vgremove : t -> string -> unit +(** remove an LVM volume group *) + +val pvremove : t -> string -> unit +(** remove an LVM physical volume *) + +val set_e2label : t -> string -> string -> unit +(** set the ext2/3/4 filesystem label *) + +val get_e2label : t -> string -> string +(** get the ext2/3/4 filesystem label *) + +val set_e2uuid : t -> string -> string -> unit +(** set the ext2/3/4 filesystem UUID *) + +val get_e2uuid : t -> string -> string +(** get the ext2/3/4 filesystem UUID *) + +val fsck : t -> string -> string -> int +(** run the filesystem checker *) + +val zero : t -> string -> unit +(** write zeroes to the device *) + +val grub_install : t -> string -> string -> unit +(** install GRUB *) + +val cp : t -> string -> string -> unit +(** copy a file *) + +val cp_a : t -> string -> string -> unit +(** copy a file or directory recursively *) + +val mv : t -> string -> string -> unit +(** move a file *) + +val drop_caches : t -> int -> unit +(** drop kernel page cache, dentries and inodes *) + +val dmesg : t -> string +(** return kernel messages *) + +val ping_daemon : t -> unit +(** ping the guest daemon *) + +val equal : t -> string -> string -> bool +(** test if two files have equal contents *) + +val strings : t -> string -> string array +(** print the printable strings in a file *) + +val strings_e : t -> string -> string -> string array +(** print the printable strings in a file *) + +val hexdump : t -> string -> string +(** dump a file in hexadecimal *) + +val zerofree : t -> string -> unit +(** zero unused inodes and disk blocks on ext2/3 filesystem *) + +val pvresize : t -> string -> unit +(** resize an LVM physical volume *) + +val sfdisk_N : t -> string -> int -> int -> int -> int -> string -> unit +(** modify a single partition on a block device *) + +val sfdisk_l : t -> string -> string +(** display the partition table *) + +val sfdisk_kernel_geometry : t -> string -> string +(** display the kernel geometry *) + +val sfdisk_disk_geometry : t -> string -> string +(** display the disk geometry from the partition table *) + +val vg_activate_all : t -> bool -> unit +(** activate or deactivate all volume groups *) + +val vg_activate : t -> bool -> string array -> unit +(** activate or deactivate some volume groups *) + +val lvresize : t -> string -> int -> unit +(** resize an LVM logical volume *) + +val resize2fs : t -> string -> unit +(** resize an ext2/ext3 filesystem *) + +val find : t -> string -> string array +(** find all files and directories *) + +val e2fsck_f : t -> string -> unit +(** check an ext2/ext3 filesystem *) + +val sleep : t -> int -> unit +(** sleep for some seconds *) + +val ntfs_3g_probe : t -> bool -> string -> int +(** probe NTFS volume *) + +val sh : t -> string -> string +(** run a command via the shell *) + +val sh_lines : t -> string -> string array +(** run a command via the shell returning lines *) + +val glob_expand : t -> string -> string array +(** expand a wildcard path *) + +val scrub_device : t -> string -> unit +(** scrub (securely wipe) a device *) + +val scrub_file : t -> string -> unit +(** scrub (securely wipe) a file *) + +val scrub_freespace : t -> string -> unit +(** scrub (securely wipe) free space *) + +val mkdtemp : t -> string -> string +(** create a temporary directory *) + +val wc_l : t -> string -> int +(** count lines in a file *) + +val wc_w : t -> string -> int +(** count words in a file *) + +val wc_c : t -> string -> int +(** count characters in a file *) + +val head : t -> string -> string array +(** return first 10 lines of a file *) + +val head_n : t -> int -> string -> string array +(** return first N lines of a file *) + +val tail : t -> string -> string array +(** return last 10 lines of a file *) + +val tail_n : t -> int -> string -> string array +(** return last N lines of a file *) + +val df : t -> string +(** report file system disk space usage *) + +val df_h : t -> string +(** report file system disk space usage (human readable) *) + +val du : t -> string -> int64 +(** estimate file space usage *) + +val initrd_list : t -> string -> string array +(** list files in an initrd *) + +val mount_loop : t -> string -> string -> unit +(** mount a file using the loop device *) + +val mkswap : t -> string -> unit +(** create a swap partition *) + +val mkswap_L : t -> string -> string -> unit +(** create a swap partition with a label *) + +val mkswap_U : t -> string -> string -> unit +(** create a swap partition with an explicit UUID *) + +val mknod : t -> int -> int -> int -> string -> unit +(** make block, character or FIFO devices *) + +val mkfifo : t -> int -> string -> unit +(** make FIFO (named pipe) *) + +val mknod_b : t -> int -> int -> int -> string -> unit +(** make block device node *) + +val mknod_c : t -> int -> int -> int -> string -> unit +(** make char device node *) + +val umask : t -> int -> int +(** set file mode creation mask (umask) *)