From 7dd8632ac399b726ea1e414bbfab97b6554fe5d8 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 4 Sep 2012 09:23:49 -0500 Subject: [PATCH] Remove unneeded code --- src/lookup_table.c | 4 ++-- src/ntfs-apply.c | 7 ------- src/symlink.c | 32 +------------------------------- 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/src/lookup_table.c b/src/lookup_table.c index 3a1e2d25..57bbc0c6 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -560,8 +560,8 @@ int dentry_resolve_ltes(struct dentry *dentry, void *table) * data stream in one of the alternate data streams instead of inside the WIM * dentry itself. So we need to check the alternate data streams too. * - * Also, note that a dentry may appear to have than one unnamed stream, but if - * the SHA1 message digest is all 0's then the corresponding stream does not + * Also, note that a dentry may appear to have more than one unnamed stream, but + * if the SHA1 message digest is all 0's then the corresponding stream does not * really "count" (this is the case for the inode's own file stream when the * file stream that should be there is actually in one of the alternate stream * entries.). This is despite the fact that we may need to extract such a diff --git a/src/ntfs-apply.c b/src/ntfs-apply.c index 3f4157d7..6409472a 100644 --- a/src/ntfs-apply.c +++ b/src/ntfs-apply.c @@ -54,13 +54,6 @@ struct ntfs_apply_args { WIMStruct *w; }; - -#if 0 -extern int ntfs_set_inode_security(ntfs_inode *ni, u32 selection, - const char *attr); -extern int ntfs_set_inode_attributes(ntfs_inode *ni, u32 attrib); -#endif - /* * Extracts a WIM resource to a NTFS attribute. */ diff --git a/src/symlink.c b/src/symlink.c index 83070ba5..59072ac0 100644 --- a/src/symlink.c +++ b/src/symlink.c @@ -185,32 +185,6 @@ ssize_t inode_readlink(const struct inode *inode, char *buf, size_t buf_len, buf_len, inode->reparse_tag); } -static int inode_set_symlink_buf(struct inode *inode, - struct lookup_table_entry *lte) -{ -#if 0 - struct ads_entry *ads_entries; - - ads_entries = MALLOC(2, sizeof(struct ads_entry)); - if (!ads_entries) - return WIMLIB_ERR_NOMEM; - ads_entry_init(&ads_entries[0]); - ads_entry_init(&ads_entries[1]); - - wimlib_assert(dentry->num_ads == 0); - wimlib_assert(dentry->ads_entries == NULL); - - ads_entries[0].lte = lte; - - /*dentry_free_ads_entries(dentry);*/ - dentry->num_ads = 2; - dentry->ads_entries = ads_entries; -#endif - wimlib_assert(inode->resolved); - inode->lte = lte; - return 0; -} - /* * Sets @dentry to be a symbolic link pointing to @target. * @@ -262,11 +236,7 @@ int inode_set_symlink(struct inode *inode, const char *target, copy_hash(lte->hash, symlink_buf_hash); } - ret = inode_set_symlink_buf(inode, lte); - - if (ret != 0) - goto out_free_lte; - + inode->lte = lte; inode->resolved = true; DEBUG("Loaded symlink buf"); -- 2.43.0