diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-09-03 15:56:29 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-09-03 17:43:19 +0100 |
commit | 20902e7ce02fa375d5d336e6b984f615472ad1b1 (patch) | |
tree | 48f634a2c5776be6640876f356be4e9b6c2d923c /generator | |
parent | b6413f8dbef92c46c4baf9499366716a166f2163 (diff) | |
download | libguestfs-20902e7ce02fa375d5d336e6b984f615472ad1b1.tar.gz libguestfs-20902e7ce02fa375d5d336e6b984f615472ad1b1.tar.xz libguestfs-20902e7ce02fa375d5d336e6b984f615472ad1b1.zip |
New API: guestfs_disk_format
Detect the disk image format of a file, in a secure way.
Diffstat (limited to 'generator')
-rw-r--r-- | generator/actions.ml | 12 |
1 files changed, 12 insertions, 0 deletions
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<filename>. +C<filename> 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<guestfs(3)/CVE-2010-3851>." }; + ] (* daemon_functions are any functions which cause some action |