path: root/libbtrfsutil/python/btrfsutilpy.h
diff options
authorOmar Sandoval <>2018-01-18 13:09:32 -0800
committerDavid Sterba <>2018-02-24 01:37:17 +0100
commitbad4208da33f3ef2adf9af2b06a597f2ce23d228 (patch)
tree691e65ddd839a3cb80fb79f288a4eb55b896f007 /libbtrfsutil/python/btrfsutilpy.h
parent23c01b3c1b0803950657f3f29914cd59f3554a84 (diff)
libbtrfsutil: add qgroup inheritance helpers
We want to hide struct btrfs_qgroup_inherit from the user because that comes from the Btrfs UAPI headers. Instead, wrap it in a struct btrfs_util_qgroup_inherit and provide helpers to manipulate it. This will be used for subvolume and snapshot creation. Signed-off-by: Omar Sandoval <> Signed-off-by: David Sterba <>
Diffstat (limited to 'libbtrfsutil/python/btrfsutilpy.h')
1 files changed, 6 insertions, 0 deletions
diff --git a/libbtrfsutil/python/btrfsutilpy.h b/libbtrfsutil/python/btrfsutilpy.h
index 6d82f7e1..3b5d7849 100644
--- a/libbtrfsutil/python/btrfsutilpy.h
+++ b/libbtrfsutil/python/btrfsutilpy.h
@@ -29,7 +29,13 @@
#include <btrfsutil.h>
+typedef struct {
+ PyObject_HEAD
+ struct btrfs_util_qgroup_inherit *inherit;
+} QgroupInherit;
extern PyTypeObject BtrfsUtilError_type;
+extern PyTypeObject QgroupInherit_type;
* Helpers for path arguments based on posixmodule.c in CPython.