summaryrefslogtreecommitdiff
path: root/qcow2.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-02-02 21:45:08 -0900
committerKent Overstreet <kent.overstreet@gmail.com>2017-02-06 23:43:16 -0900
commitd230eaea612b5649a9b84ca1f5bb41455251741e (patch)
treeaefbe80729fb2bed34e0b6e7e63cef323c29b18a /qcow2.h
parent5933f9478cc21e8b319309d2794948050d09b031 (diff)
Add a command to dump filesystem metadata
Diffstat (limited to 'qcow2.h')
-rw-r--r--qcow2.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/qcow2.h b/qcow2.h
new file mode 100644
index 00000000..c6f0b6ba
--- /dev/null
+++ b/qcow2.h
@@ -0,0 +1,24 @@
+#ifndef _QCOW2_H
+#define _QCOW2_H
+
+#include <linux/types.h>
+#include "ccan/darray/darray.h"
+
+struct range {
+ u64 start;
+ u64 end;
+};
+
+typedef darray(struct range) sparse_data;
+
+static inline void data_add(sparse_data *data, u64 offset, u64 size)
+{
+ darray_append(*data, (struct range) {
+ .start = offset,
+ .end = offset + size
+ });
+}
+
+void qcow2_write_image(int, int, sparse_data *, unsigned);
+
+#endif /* _QCOW2_H */