diff options
author | Colin Walters <walters@verbum.org> | 2017-03-28 22:42:26 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-03-30 13:14:43 +0000 |
commit | 5f45ab0bb19d0482506797dc3daf739cd74f11a7 (patch) | |
tree | ce364e274031d8036f20292f3e86e926ffb7c269 /src/libotutil | |
parent | 0ce7ab382769d63f12370e8325c40e1f997006fd (diff) | |
download | ostree-5f45ab0bb19d0482506797dc3daf739cd74f11a7.tar.gz |
libutil: Delete some unused checksum helper API
This code was last used in 9618232f4da325692dcf98fd6ff5b8abd9fce66c
which is sooo old and outdated. Delete.
Closes: #767
Approved by: jlebon
Diffstat (limited to 'src/libotutil')
-rw-r--r-- | src/libotutil/ot-checksum-utils.c | 43 | ||||
-rw-r--r-- | src/libotutil/ot-checksum-utils.h | 10 |
2 files changed, 0 insertions, 53 deletions
diff --git a/src/libotutil/ot-checksum-utils.c b/src/libotutil/ot-checksum-utils.c index 4b5c824a..39417044 100644 --- a/src/libotutil/ot-checksum-utils.c +++ b/src/libotutil/ot-checksum-utils.c @@ -180,46 +180,3 @@ ot_checksum_file_at (int dfd, return ret; } - -static void -checksum_stream_thread (GSimpleAsyncResult *result, - GObject *object, - GCancellable *cancellable) -{ - GError *error = NULL; - guchar *csum; - - if (!ot_gio_checksum_stream ((GInputStream*)object, &csum, - cancellable, &error)) - g_simple_async_result_take_error (result, error); - else - g_simple_async_result_set_op_res_gpointer (result, csum, g_free); -} - -void -ot_gio_checksum_stream_async (GInputStream *in, - int io_priority, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - GSimpleAsyncResult *result; - - result = g_simple_async_result_new ((GObject*) in, - callback, user_data, - ot_gio_checksum_stream_async); - - g_simple_async_result_run_in_thread (result, checksum_stream_thread, io_priority, cancellable); - g_object_unref (result); -} - -guchar * -ot_gio_checksum_stream_finish (GInputStream *in, - GAsyncResult *result, - GError **error) -{ - GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result); - - g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == ot_gio_checksum_stream_async); - return g_memdup (g_simple_async_result_get_op_res_gpointer (simple), 32); -} diff --git a/src/libotutil/ot-checksum-utils.h b/src/libotutil/ot-checksum-utils.h index b580fc1c..fdf7b09b 100644 --- a/src/libotutil/ot-checksum-utils.h +++ b/src/libotutil/ot-checksum-utils.h @@ -61,14 +61,4 @@ char * ot_checksum_file_at (int dfd, GCancellable *cancellable, GError **error); -void ot_gio_checksum_stream_async (GInputStream *in, - int io_priority, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -guchar * ot_gio_checksum_stream_finish (GInputStream *in, - GAsyncResult *result, - GError **error); - G_END_DECLS |