summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKarel Zak2013-09-11 14:37:22 +0200
committerKarel Zak2013-09-11 16:40:06 +0200
commitdb2a3dda748cbf06c1129cbb24a003a703c2fa85 (patch)
tree12294d09f98f3474b7dd779882e1e3925bce93e4 /include
parentwipefs: Also wipe superblocks with bad checksums (diff)
downloadkernel-qcow2-util-linux-db2a3dda748cbf06c1129cbb24a003a703c2fa85.tar.gz
kernel-qcow2-util-linux-db2a3dda748cbf06c1129cbb24a003a703c2fa85.tar.xz
kernel-qcow2-util-linux-db2a3dda748cbf06c1129cbb24a003a703c2fa85.zip
lib: add crc64()
Based on bcache code from Rolf Fokkens. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/Makemodule.am1
-rw-r--r--include/crc32.h1
-rw-r--r--include/crc64.h9
3 files changed, 11 insertions, 0 deletions
diff --git a/include/Makemodule.am b/include/Makemodule.am
index 62a8978da..c072af0f1 100644
--- a/include/Makemodule.am
+++ b/include/Makemodule.am
@@ -11,6 +11,7 @@ dist_noinst_HEADERS += \
include/colors.h \
include/cpuset.h \
include/crc32.h \
+ include/crc64.h \
include/env.h \
include/exec_shell.h \
include/exitcodes.h \
diff --git a/include/crc32.h b/include/crc32.h
index b454be9fc..26169109e 100644
--- a/include/crc32.h
+++ b/include/crc32.h
@@ -1,6 +1,7 @@
#ifndef UL_NG_CRC32_H
#define UL_NG_CRC32_H
+#include <sys/types.h>
#include <stdint.h>
extern uint32_t crc32(uint32_t seed, const unsigned char *buf, size_t len);
diff --git a/include/crc64.h b/include/crc64.h
new file mode 100644
index 000000000..40475d56f
--- /dev/null
+++ b/include/crc64.h
@@ -0,0 +1,9 @@
+#ifndef UTIL_LINUX_CRC64_H
+#define UTIL_LINUX_CRC64_H
+
+#include <sys/types.h>
+#include <stdint.h>
+
+extern uint64_t crc64(uint64_t seed, const unsigned char *data, size_t len);
+
+#endif