X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=ocaml%2Fguestfs.mli;h=5cab5887bf6e6365586b5a64dd7e9d3d405fb093;hb=f20854ec61eef1aea313920f0cf193a78c1a9219;hp=564f16397ea644013e626a1760e8fbe2be4c325d;hpb=c41fe04a652437c920acb0e820762c53bf44a139;p=libguestfs.git diff --git a/ocaml/guestfs.mli b/ocaml/guestfs.mli index 564f163..5cab588 100644 --- a/ocaml/guestfs.mli +++ b/ocaml/guestfs.mli @@ -220,6 +220,9 @@ 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 *) @@ -277,6 +280,12 @@ val set_ready : t -> unit 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 *) @@ -601,3 +610,90 @@ val find : t -> string -> string array 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) *) +