The following commit has been merged in the master branch:
commit c384fe2132868dc7a70799aa50bf5e8677aa6f86
Author: RaphaĆ«l Hertzog <[email protected]>
Date:   Sun Sep 11 09:23:17 2011 +0200

    libdpkg: Add new fd_fd_copy_and_md5()
    
    This copies the data between both file descriptors and at the same time
    computes the MD5 checksum of the copied data.
    
    Signed-off-by: Guillem Jover <[email protected]>

diff --git a/lib/dpkg/buffer.h b/lib/dpkg/buffer.h
index 98b519a..970ce3f 100644
--- a/lib/dpkg/buffer.h
+++ b/lib/dpkg/buffer.h
@@ -62,6 +62,11 @@ struct buffer_data {
                           NULL, BUFFER_FILTER_NULL, \
                           fd2, BUFFER_WRITE_FD, \
                           limit, __VA_ARGS__)
+# define fd_fd_copy_and_md5(fd1, fd2, hash, limit, ...) \
+       buffer_copy_IntInt(fd1, BUFFER_READ_FD, \
+                          hash, BUFFER_FILTER_MD5, \
+                          fd2, BUFFER_WRITE_FD, \
+                          limit, __VA_ARGS__)
 # define fd_vbuf_copy(fd, buf, limit, ...) \
        buffer_copy_IntPtr(fd, BUFFER_READ_FD, \
                           NULL, BUFFER_FILTER_NULL, \

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to