summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-04-10 21:23:27 +0100
committerRichard Jones <rjones@redhat.com>2010-04-10 21:23:27 +0100
commit540da0bc1999deda670e846b8db7291826a1a728 (patch)
treed5ae22a7694dcab0afe1eab5d373a9f5db78ebd2 /src
parent5466638279b51d46e6b24d4f7148d520cb4f3c34 (diff)
downloadlibguestfs-540da0bc1999deda670e846b8db7291826a1a728.tar.gz
libguestfs-540da0bc1999deda670e846b8db7291826a1a728.tar.xz
libguestfs-540da0bc1999deda670e846b8db7291826a1a728.zip
New API: checksum-device for checksumming devices.
Analogous to the usual 'checksum' call.
Diffstat (limited to 'src')
-rw-r--r--src/MAX_PROC_NR2
-rwxr-xr-xsrc/generator.ml10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR
index f1f094b1..997def45 100644
--- a/src/MAX_PROC_NR
+++ b/src/MAX_PROC_NR
@@ -1 +1 @@
-236
+237
diff --git a/src/generator.ml b/src/generator.ml
index 50ae91d0..535c412b 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -4443,6 +4443,16 @@ Note that only MBR (old DOS-style) partitions have type bytes.
You will get undefined results for other partition table
types (see C<guestfs_part_get_parttype>).");
+ ("checksum_device", (RString "checksum", [String "csumtype"; Device "device"]), 237, [],
+ [InitISOFS, Always, TestOutput (
+ [["checksum_device"; "md5"; "/dev/sdd"]],
+ (Digest.to_hex (Digest.file "images/test.iso")))],
+ "compute MD5, SHAx or CRC checksum of the contents of a device",
+ "\
+This call computes the MD5, SHAx or CRC checksum of the
+contents of the device named C<device>. For the types of
+checksums supported see the C<guestfs_checksum> command.");
+
]
let all_functions = non_daemon_functions @ daemon_functions