2 * Copyright (C) 2018 Facebook
4 * This file is part of libbtrfsutil.
6 * libbtrfsutil is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * libbtrfsutil is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with libbtrfsutil. If not, see <http://www.gnu.org/licenses/>.
23 #define PY_SSIZE_T_CLEAN
28 #include "structmember.h"
30 #include <btrfsutil.h>
34 struct btrfs_util_qgroup_inherit *inherit;
37 extern PyTypeObject BtrfsUtilError_type;
38 extern PyTypeObject QgroupInherit_type;
41 * Helpers for path arguments based on posixmodule.c in CPython.
51 int path_converter(PyObject *o, void *p);
52 void path_cleanup(struct path_arg *path);
54 void SetFromBtrfsUtilError(enum btrfs_util_error err);
55 void SetFromBtrfsUtilErrorWithPath(enum btrfs_util_error err,
56 struct path_arg *path);
57 void SetFromBtrfsUtilErrorWithPaths(enum btrfs_util_error err,
58 struct path_arg *path1,
59 struct path_arg *path2);
61 PyObject *filesystem_sync(PyObject *self, PyObject *args, PyObject *kwds);
62 PyObject *start_sync(PyObject *self, PyObject *args, PyObject *kwds);
63 PyObject *wait_sync(PyObject *self, PyObject *args, PyObject *kwds);
64 PyObject *is_subvolume(PyObject *self, PyObject *args, PyObject *kwds);
65 PyObject *subvolume_id(PyObject *self, PyObject *args, PyObject *kwds);
67 void add_module_constants(PyObject *m);
69 #endif /* BTRFSUTILPY_H */