[ostree] libglnx porting: xattr calls



commit b67f5364ac5b74e96171ba6683d88c2e5752d8e8
Author: Colin Walters <walters verbum org>
Date:   Thu Mar 17 11:02:48 2016 -0400

    libglnx porting: xattr calls
    
    These are straightforward as the libgsystem versions were already just
    equivalent shims.

 src/libostree/ostree-core.c           |    3 ++-
 src/libostree/ostree-diff.c           |    3 ++-
 src/libostree/ostree-repo-checkout.c  |    8 ++++----
 src/libostree/ostree-repo-commit.c    |   11 ++++++-----
 src/libostree/ostree-repo.c           |    4 ++--
 src/libostree/ostree-sysroot-deploy.c |    4 ++--
 6 files changed, 18 insertions(+), 15 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index 11c61f9..219eb2b 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -766,7 +766,8 @@ ostree_checksum_file (GFile            *f,
 
   if (objtype == OSTREE_OBJECT_TYPE_FILE)
     {
-      if (!gs_file_get_all_xattrs (f, &xattrs, cancellable, error))
+      if (!glnx_dfd_name_get_all_xattrs (AT_FDCWD, gs_file_get_path_cached (f),
+                                         &xattrs, cancellable, error))
         goto out;
     }
 
diff --git a/src/libostree/ostree-diff.c b/src/libostree/ostree-diff.c
index c47e98c..4b73346 100644
--- a/src/libostree/ostree-diff.c
+++ b/src/libostree/ostree-diff.c
@@ -48,7 +48,8 @@ get_file_checksum (OstreeDiffFlags  flags,
 
       if (!(flags & OSTREE_DIFF_FLAGS_IGNORE_XATTRS))
         {
-          if (!gs_file_get_all_xattrs (f, &xattrs, cancellable, error))
+          if (!glnx_dfd_name_get_all_xattrs (AT_FDCWD, gs_file_get_path_cached (f),
+                                             &xattrs, cancellable, error))
             goto out;
         }
 
diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c
index 0879f44..ea70fd3 100644
--- a/src/libostree/ostree-repo-checkout.c
+++ b/src/libostree/ostree-repo-checkout.c
@@ -159,7 +159,7 @@ write_regular_file_content (OstreeRepo            *self,
               
       if (xattrs)
         {
-          if (!gs_fd_set_all_xattrs (fd, xattrs, cancellable, error))
+          if (!glnx_fd_set_all_xattrs (fd, xattrs, cancellable, error))
             goto out;
         }
     }
@@ -220,7 +220,7 @@ checkout_file_from_input_at (OstreeRepo     *self,
 
           if (xattrs)
             {
-              if (!gs_dfd_and_name_set_all_xattrs (destination_dfd, destination_name,
+              if (!glnx_dfd_name_set_all_xattrs (destination_dfd, destination_name,
                                                    xattrs, cancellable, error))
                 goto out;
             }
@@ -288,7 +288,7 @@ checkout_file_unioning_from_input_at (OstreeRepo     *repo,
           
       if (xattrs)
         {
-          if (!gs_dfd_and_name_set_all_xattrs (destination_dfd, temp_filename,
+          if (!glnx_dfd_name_set_all_xattrs (destination_dfd, temp_filename,
                                                xattrs, cancellable, error))
             goto out;
         }
@@ -668,7 +668,7 @@ checkout_tree_at (OstreeRepo                        *self,
 
       if (xattrs)
         {
-          if (!gs_fd_set_all_xattrs (destination_dfd, xattrs, cancellable, error))
+          if (!glnx_fd_set_all_xattrs (destination_dfd, xattrs, cancellable, error))
             goto out;
         }
     }
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index a7c1619..94c9f73 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -219,7 +219,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
 
       if (xattrs != NULL)
         {
-          if (!gs_dfd_and_name_set_all_xattrs (self->tmp_dir_fd, temp_filename,
+          if (!glnx_dfd_name_set_all_xattrs (self->tmp_dir_fd, temp_filename,
                                                xattrs, cancellable, error))
             goto out;
         }
@@ -251,7 +251,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
 
           if (xattrs)
             {
-              if (!gs_fd_set_all_xattrs (fd, xattrs, cancellable, error))
+              if (!glnx_fd_set_all_xattrs (fd, xattrs, cancellable, error))
                 goto out;
             }
         }
@@ -2322,20 +2322,21 @@ get_modified_xattrs (OstreeRepo                       *self,
     {
       if (path)
         {
-          if (!gs_file_get_all_xattrs (path, &ret_xattrs, cancellable, error))
+          if (!glnx_dfd_name_get_all_xattrs (AT_FDCWD, gs_file_get_path_cached (path),
+                                             &ret_xattrs, cancellable, error))
             goto out;
         }
       else if (dfd_subpath == NULL)
         {
           g_assert (dfd != -1);
-          if (!gs_fd_get_all_xattrs (dfd, &ret_xattrs,
+          if (!glnx_fd_get_all_xattrs (dfd, &ret_xattrs,
                                      cancellable, error))
             goto out;
         }
       else
         {
           g_assert (dfd != -1);
-          if (!gs_dfd_and_name_get_all_xattrs (dfd, dfd_subpath, &ret_xattrs,
+          if (!glnx_dfd_name_get_all_xattrs (dfd, dfd_subpath, &ret_xattrs,
                                                cancellable, error))
             goto out;
         }
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index d4539ba..a0e45c3 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -2951,7 +2951,7 @@ ostree_repo_load_file (OstreeRepo         *self,
 
                   if (out_xattrs)
                     {
-                      if (!gs_fd_get_all_xattrs (fd, &ret_xattrs,
+                      if (!glnx_fd_get_all_xattrs (fd, &ret_xattrs,
                                                  cancellable, error))
                         goto out;
                     }
@@ -2965,7 +2965,7 @@ ostree_repo_load_file (OstreeRepo         *self,
               else if (g_file_info_get_file_type (ret_file_info) == G_FILE_TYPE_SYMBOLIC_LINK
                        && out_xattrs)
                 {
-                  if (!gs_dfd_and_name_get_all_xattrs (self->objects_dir_fd, loose_path_buf,
+                  if (!glnx_dfd_name_get_all_xattrs (self->objects_dir_fd, loose_path_buf,
                                                        &ret_xattrs,
                                                        cancellable, error))
                     goto out;
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index ea0db9b..5779d7c 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -97,10 +97,10 @@ dirfd_copy_attributes_and_xattrs (int            src_parent_dfd,
    * right.  This will allow other users access if they have ACLs, but
    * oh well.
    */ 
-  if (!gs_dfd_and_name_get_all_xattrs (src_parent_dfd, src_name,
+  if (!glnx_dfd_name_get_all_xattrs (src_parent_dfd, src_name,
                                        &xattrs, cancellable, error))
     goto out;
-  if (!gs_fd_set_all_xattrs (dest_dfd, xattrs,
+  if (!glnx_fd_set_all_xattrs (dest_dfd, xattrs,
                              cancellable, error))
     goto out;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]