summaryrefslogtreecommitdiff
path: root/glnx-xattrs.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-02-15 16:09:58 -0500
committerColin Walters <walters@verbum.org>2015-02-15 17:26:47 -0500
commitf5399c8348b04f9cf5bd4d9d3903e5843c1feeb5 (patch)
tree2c0a8a707f6c2a88ea2900295a1c26cee0687437 /glnx-xattrs.h
parentba67dd39a7d5cc779f83bb22512740cdb4c61b33 (diff)
downloadlibglnx-f5399c8348b04f9cf5bd4d9d3903e5843c1feeb5.tar.gz
Import xattr reading code from libgsystem
Diffstat (limited to 'glnx-xattrs.h')
-rw-r--r--glnx-xattrs.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/glnx-xattrs.h b/glnx-xattrs.h
new file mode 100644
index 0000000..360092d
--- /dev/null
+++ b/glnx-xattrs.h
@@ -0,0 +1,45 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ *
+ * Copyright (C) 2014,2015 Colin Walters <walters@verbum.org>.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#pragma once
+
+#include <glnx-backport-autoptr.h>
+#include <limits.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <attr/xattr.h>
+
+G_BEGIN_DECLS
+
+gboolean
+glnx_dfd_name_get_all_xattrs (int dfd,
+ const char *name,
+ GVariant **out_xattrs,
+ GCancellable *cancellable,
+ GError **error);
+
+gboolean
+glnx_fd_get_all_xattrs (int fd,
+ GVariant **out_xattrs,
+ GCancellable *cancellable,
+ GError **error);
+
+G_END_DECLS