diff options
author | Colin Walters <walters@verbum.org> | 2015-01-03 12:03:36 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-01-03 12:03:36 -0500 |
commit | 6b7803320442a5c85b0fdc960ed473782f2da6fe (patch) | |
tree | 4ca02408224444d74aed87443ce1a9e638368e05 | |
parent | ba23485a334cef307e1636b108c6254be3935711 (diff) | |
download | ostree-6b7803320442a5c85b0fdc960ed473782f2da6fe.tar.gz |
deploy: Update to use latest libgsystem APIwip/gs-dir-iter
-rw-r--r-- | src/libostree/ostree-sysroot-deploy.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 40dd7b54..3baa9a36 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -33,25 +33,6 @@ #define OSTREE_CONFIGMERGE_ID "d3863baec13e4449ab0384684a8af3a7" #define OSTREE_DEPLOYMENT_COMPLETE_ID "dd440e3e549083b63d0efc7dc15255f1" -/* FIXME when we depend on new enough libgsystem, move to - * gs_dfd_and_name_get_all_xattrs(). - */ -static gboolean -dfd_and_name_get_all_xattrs (int dfd, - const char *name, - GVariant **out_xattrs, - GCancellable *cancellable, - GError **error) -{ - /* A workaround for the lack of lgetxattrat(), thanks to Florian Weimer: - * https://mail.gnome.org/archives/ostree-list/2014-February/msg00017.html - */ - gs_free char *path = g_strdup_printf ("/proc/self/fd/%d/%s", dfd, name); - gs_unref_object GFile *fpath = g_file_new_for_path (path); - return gs_file_get_all_xattrs (fpath, out_xattrs, - cancellable, error); -} - static gboolean copy_one_file_fsync_at (int src_parent_dfd, int dest_parent_dfd, @@ -63,9 +44,9 @@ copy_one_file_fsync_at (int src_parent_dfd, gboolean ret = FALSE; gs_unref_variant GVariant *src_xattrs = NULL; - if (!dfd_and_name_get_all_xattrs (src_parent_dfd, name, - &src_xattrs, - cancellable, error)) + if (!gs_dfd_and_name_get_all_xattrs (src_parent_dfd, name, + &src_xattrs, + cancellable, error)) goto out; if (S_ISREG (stbuf->st_mode)) @@ -171,8 +152,8 @@ dirfd_copy_attributes_and_xattrs (int src_parent_dfd, * right. This will allow other users access if they have ACLs, but * oh well. */ - if (!dfd_and_name_get_all_xattrs (src_parent_dfd, src_name, - &xattrs, cancellable, error)) + if (!gs_dfd_and_name_get_all_xattrs (src_parent_dfd, src_name, + &xattrs, cancellable, error)) goto out; if (!gs_fd_set_all_xattrs (dest_dfd, xattrs, cancellable, error)) |