libglnx porting: xattr calls

These are straightforward as the libgsystem versions were already just
equivalent shims.
This commit is contained in:
Colin Walters 2016-03-17 11:02:48 -04:00
parent 684029daa3
commit b67f5364ac
6 changed files with 18 additions and 15 deletions

View File

@ -766,7 +766,8 @@ ostree_checksum_file (GFile *f,
if (objtype == OSTREE_OBJECT_TYPE_FILE) 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; goto out;
} }

View File

@ -48,7 +48,8 @@ get_file_checksum (OstreeDiffFlags flags,
if (!(flags & OSTREE_DIFF_FLAGS_IGNORE_XATTRS)) 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; goto out;
} }

View File

@ -159,7 +159,7 @@ write_regular_file_content (OstreeRepo *self,
if (xattrs) if (xattrs)
{ {
if (!gs_fd_set_all_xattrs (fd, xattrs, cancellable, error)) if (!glnx_fd_set_all_xattrs (fd, xattrs, cancellable, error))
goto out; goto out;
} }
} }
@ -220,7 +220,7 @@ checkout_file_from_input_at (OstreeRepo *self,
if (xattrs) 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)) xattrs, cancellable, error))
goto out; goto out;
} }
@ -288,7 +288,7 @@ checkout_file_unioning_from_input_at (OstreeRepo *repo,
if (xattrs) 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)) xattrs, cancellable, error))
goto out; goto out;
} }
@ -668,7 +668,7 @@ checkout_tree_at (OstreeRepo *self,
if (xattrs) 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; goto out;
} }
} }

View File

@ -219,7 +219,7 @@ commit_loose_object_trusted (OstreeRepo *self,
if (xattrs != NULL) 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)) xattrs, cancellable, error))
goto out; goto out;
} }
@ -251,7 +251,7 @@ commit_loose_object_trusted (OstreeRepo *self,
if (xattrs) if (xattrs)
{ {
if (!gs_fd_set_all_xattrs (fd, xattrs, cancellable, error)) if (!glnx_fd_set_all_xattrs (fd, xattrs, cancellable, error))
goto out; goto out;
} }
} }
@ -2322,20 +2322,21 @@ get_modified_xattrs (OstreeRepo *self,
{ {
if (path) 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; goto out;
} }
else if (dfd_subpath == NULL) else if (dfd_subpath == NULL)
{ {
g_assert (dfd != -1); g_assert (dfd != -1);
if (!gs_fd_get_all_xattrs (dfd, &ret_xattrs, if (!glnx_fd_get_all_xattrs (dfd, &ret_xattrs,
cancellable, error)) cancellable, error))
goto out; goto out;
} }
else else
{ {
g_assert (dfd != -1); 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)) cancellable, error))
goto out; goto out;
} }

View File

@ -2951,7 +2951,7 @@ ostree_repo_load_file (OstreeRepo *self,
if (out_xattrs) if (out_xattrs)
{ {
if (!gs_fd_get_all_xattrs (fd, &ret_xattrs, if (!glnx_fd_get_all_xattrs (fd, &ret_xattrs,
cancellable, error)) cancellable, error))
goto out; 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 else if (g_file_info_get_file_type (ret_file_info) == G_FILE_TYPE_SYMBOLIC_LINK
&& out_xattrs) && 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, &ret_xattrs,
cancellable, error)) cancellable, error))
goto out; goto out;

View File

@ -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 * right. This will allow other users access if they have ACLs, but
* oh well. * 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)) &xattrs, cancellable, error))
goto out; goto out;
if (!gs_fd_set_all_xattrs (dest_dfd, xattrs, if (!glnx_fd_set_all_xattrs (dest_dfd, xattrs,
cancellable, error)) cancellable, error))
goto out; goto out;