diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-02-02 21:45:08 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-02-06 23:43:16 -0900 |
commit | d230eaea612b5649a9b84ca1f5bb41455251741e (patch) | |
tree | aefbe80729fb2bed34e0b6e7e63cef323c29b18a /qcow2.h | |
parent | 5933f9478cc21e8b319309d2794948050d09b031 (diff) |
Add a command to dump filesystem metadata
Diffstat (limited to 'qcow2.h')
-rw-r--r-- | qcow2.h | 24 |
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 */ |