From 5c7d2296cabd32a877bc7ae34c456136195d7312 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 7 Aug 2001 22:47:02 +0000 Subject: [PATCH] * extfs.h (struct entry): Remove unused `has_changed' field. It's only written but never read. (struct inode): Likewise. * extfs.c: All dependencies changed. (extfs_open): Mark file as changed if it's open for writing. --- vfs/ChangeLog | 8 ++++++++ vfs/extfs.c | 9 +-------- vfs/extfs.h | 2 -- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index f5aa3456a..a5ccf41b3 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,11 @@ +2001-08-07 Pavel Roskin + + * extfs.h (struct entry): Remove unused `has_changed' field. + It's only written but never read. + (struct inode): Likewise. + * extfs.c: All dependencies changed. + (extfs_open): Mark file as changed if it's open for writing. + 2001-08-07 Oskar Liljeblad * extfs/uzip: Update to version 1.4.0. diff --git a/vfs/extfs.c b/vfs/extfs.c index 52a8e0ec7..89e251b70 100644 --- a/vfs/extfs.c +++ b/vfs/extfs.c @@ -84,7 +84,6 @@ static void make_dot_doubledot (struct entry *ent) parent = (parentry != NULL) ? parentry->inode : NULL; entry->name = g_strdup ("."); - entry->has_changed = 0; entry->inode = inode; entry->dir = ent; inode->local_filename = NULL; @@ -94,7 +93,6 @@ static void make_dot_doubledot (struct entry *ent) entry->next_in_dir = g_new (struct entry, 1); entry=entry->next_in_dir; entry->name = g_strdup (".."); - entry->has_changed = 0; inode->last_in_subdir = entry; entry->next_in_dir = NULL; if (parent != NULL) { @@ -119,7 +117,6 @@ static struct entry *generate_entry (struct archive *archive, entry = g_new (struct entry, 1); entry->name = g_strdup (name); - entry->has_changed = 0; entry->next_in_dir = NULL; entry->dir = parentry; if (parent != NULL) { @@ -128,7 +125,6 @@ static struct entry *generate_entry (struct archive *archive, } inode = g_new (struct inode, 1); entry->inode = inode; - inode->has_changed = 0; inode->local_filename = NULL; inode->linkname = 0; inode->inode = (archive->__inode_counter)++; @@ -305,7 +301,6 @@ static int read_archive (int fstype, char *name, struct archive **pparc) } entry = g_new (struct entry, 1); entry->name = g_strdup (p); - entry->has_changed = 0; entry->next_in_dir = NULL; entry->dir = pent; if (pent != NULL) { @@ -330,7 +325,6 @@ static int read_archive (int fstype, char *name, struct archive **pparc) inode = g_new (struct inode, 1); entry->inode = inode; inode->local_filename = NULL; - inode->has_changed = 0; inode->inode = (current_archive->__inode_counter)++; inode->nlink = 1; inode->dev = current_archive->rdev; @@ -637,7 +631,7 @@ static void *extfs_open (vfs *me, char *file, int flags, int mode) extfs_info = g_new (struct pseudofile, 1); extfs_info->archive = archive; extfs_info->entry = entry; - extfs_info->has_changed = 0; + extfs_info->has_changed = do_create; extfs_info->local_handle = local_handle; /* i.e. we had no open files and now we have one */ @@ -1292,7 +1286,6 @@ static int extfs_ungetlocalcopy (vfs *me, char *path, char *local, int has_chang if (fp == NULL) return 0; if (!strcmp (fp->entry->inode->local_filename, local)) { - fp->entry->inode->has_changed = has_changed; fp->archive->fd_usage--; extfs_close ((void *) fp); return 0; diff --git a/vfs/extfs.h b/vfs/extfs.h index 3b7768945..0764da4e1 100644 --- a/vfs/extfs.h +++ b/vfs/extfs.h @@ -23,7 +23,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307 struct inode; struct entry { - int has_changed; struct entry *next_in_dir; struct entry *dir; char *name; @@ -33,7 +32,6 @@ struct entry { struct archive; struct inode { - int has_changed; nlink_t nlink; struct entry *first_in_subdir; /* only used if this is a directory */ struct entry *last_in_subdir;