From 20902e7ce02fa375d5d336e6b984f615472ad1b1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 3 Sep 2012 15:56:29 +0100 Subject: New API: guestfs_disk_format Detect the disk image format of a file, in a secure way. --- generator/actions.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'generator/actions.ml') diff --git a/generator/actions.ml b/generator/actions.ml index 9c2470dc..b131eafd 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -2272,6 +2272,18 @@ However it is not foolproof because the registry is not strongly-typed and fields can contain arbitrary or unexpected data." }; + { defaults with + name = "disk_format"; + style = RString "format", [String "filename"], []; + shortdesc = "detect the disk format of a disk image"; + longdesc = "\ +Detect and return the format of the disk image called C. +C can also be a host device, etc. If the format of the +image could not be detected, then C<\"unknown\"> is returned. + +Note that detecting the disk format can be insecure under some +circumstances. See L." }; + ] (* daemon_functions are any functions which cause some action -- cgit