From ff2b881275f641bd934207d58ba14289a4190d0e Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 26 May 2017 13:40:14 -0400 Subject: [PATCH] lib/fsutil: Delete unused GFile ioctl method All the deployment code uses fds. Closes: #889 Approved by: jlebon --- src/libostree/ostree-linuxfsutil.c | 32 ------------------------------ src/libostree/ostree-linuxfsutil.h | 6 ------ 2 files changed, 38 deletions(-) diff --git a/src/libostree/ostree-linuxfsutil.c b/src/libostree/ostree-linuxfsutil.c index b270a94e..dd717118 100644 --- a/src/libostree/ostree-linuxfsutil.c +++ b/src/libostree/ostree-linuxfsutil.c @@ -99,35 +99,3 @@ _ostree_linuxfs_fd_alter_immutable_flag (int fd, out: return ret; } - -gboolean -_ostree_linuxfs_alter_immutable_flag (GFile *path, - gboolean new_immutable_state, - GCancellable *cancellable, - GError **error) -{ - gboolean ret = FALSE; - glnx_fd_close int fd = -1; - - if (g_cancellable_set_error_if_cancelled (cancellable, error)) - return FALSE; - - fd = open (gs_file_get_path_cached (path), O_RDONLY|O_NONBLOCK|O_LARGEFILE); - if (fd == -1) - { - int errsv = errno; - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "open(%s): %s", - gs_file_get_path_cached (path), - g_strerror (errsv)); - goto out; - } - - if (!_ostree_linuxfs_fd_alter_immutable_flag (fd, new_immutable_state, - cancellable, error)) - goto out; - - ret = TRUE; - out: - return ret; -} diff --git a/src/libostree/ostree-linuxfsutil.h b/src/libostree/ostree-linuxfsutil.h index 9c74b8a9..84122a70 100644 --- a/src/libostree/ostree-linuxfsutil.h +++ b/src/libostree/ostree-linuxfsutil.h @@ -30,10 +30,4 @@ _ostree_linuxfs_fd_alter_immutable_flag (int fd, GCancellable *cancellable, GError **error); -gboolean -_ostree_linuxfs_alter_immutable_flag (GFile *path, - gboolean new_immutable_state, - GCancellable *cancellable, - GError **error); - G_END_DECLS