From c9429aeece3b8642de637f7a21e68046bd690658 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 23 Feb 2020 15:45:34 +0100 Subject: Remove the sqfs_inode_copy function With unified payload size counters, copying an inode is now trivial. Signed-off-by: David Oberhollenzer --- lib/sqfs/inode.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'lib/sqfs/inode.c') diff --git a/lib/sqfs/inode.c b/lib/sqfs/inode.c index bda244b..02d23e2 100644 --- a/lib/sqfs/inode.c +++ b/lib/sqfs/inode.c @@ -33,20 +33,6 @@ static int inverse_type[] = { [SQFS_INODE_EXT_SOCKET] = SQFS_INODE_SOCKET, }; -int sqfs_inode_copy(const sqfs_inode_generic_t *src, - sqfs_inode_generic_t **out) -{ - size_t size = sizeof(*src) + src->payload_bytes_used; - sqfs_inode_generic_t *copy = calloc(1, size); - - if (copy == NULL) - return SQFS_ERROR_ALLOC; - - memcpy(copy, src, size); - *out = copy; - return 0; -} - int sqfs_inode_get_xattr_index(const sqfs_inode_generic_t *inode, sqfs_u32 *out) { -- cgit v1.2.3