summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2002-08-06 12:33:17 +0000
committerMarcus Brinkmann <marcus@gnu.org>2002-08-06 12:33:17 +0000
commitb4b8258228765bcadff6a503b50db32c7003660a (patch)
tree1a19579c6cae5c978240d9c5cadd7f81e946136c
parent3dd6cc0adff72adba0f32cd4313c3e59b45c5aa0 (diff)
2002-08-06 Marcus Brinkmann <marcus@gnu.org>
* inode.c (use_file_start_id): Use file_start for directories, so the inode of the directory is used for the ".." entries in all sub-directories. Contrary to ChangeLog entry 2001-11-27, this is safe, because the ISO9660 specification mandates that the first entry in every directory must be ".", so a non-file_start using directory record can not be the first one.
-rw-r--r--isofs/ChangeLog9
-rw-r--r--isofs/inode.c18
2 files changed, 9 insertions, 18 deletions
diff --git a/isofs/ChangeLog b/isofs/ChangeLog
index 146c5f40..2d76e1ae 100644
--- a/isofs/ChangeLog
+++ b/isofs/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-06 Marcus Brinkmann <marcus@gnu.org>
+
+ * inode.c (use_file_start_id): Use file_start for directories, so
+ the inode of the directory is used for the ".." entries in all
+ sub-directories. Contrary to ChangeLog entry 2001-11-27, this is
+ safe, because the ISO9660 specification mandates that the first
+ entry in every directory must be ".", so a non-file_start using
+ directory record can not be the first one.
+
2002-06-08 Roland McGrath <roland@frob.com>
* inode.c (diskfs_cached_lookup): Use ino_t for argument.
diff --git a/isofs/inode.c b/isofs/inode.c
index 3ec4d8f0..c086c626 100644
--- a/isofs/inode.c
+++ b/isofs/inode.c
@@ -83,24 +83,6 @@ inode_cache_find (off_t id, struct node **npp)
int
use_file_start_id (struct dirrect *record, struct rrip_lookup *rr)
{
- /* If it is a directory, don't use file_start. */
- if (rr->valid & VALID_PX)
- {
- if (((rr->valid & VALID_MD) == 0) && (rr->mode & S_IFDIR))
- return 0;
- }
- else
- if ((rr->valid & VALID_MD) == 0)
- {
- /* If there are no periods, it's a directory. */
- if (((rr->valid & VALID_NM) && !index (rr->name, '.'))
- || (!(rr->valid & VALID_NM) && !memchr (record->name, '.',
- record->namelen)))
- return 0;
- }
- if ((rr->valid & VALID_MD) && (rr->allmode & S_IFDIR))
- return 0;
-
/* If it is a symlink or a zero length file, don't use file_start. */
if (rr->valid & VALID_SL || isonum_733 (record->size) == 0)
return 0;