summaryrefslogtreecommitdiff
path: root/isofs/lookup.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2000-11-26 02:12:27 +0000
committerMarcus Brinkmann <marcus@gnu.org>2000-11-26 02:12:27 +0000
commitce0f972cecd30fc1457aa0a9a0fa1ad966d23c12 (patch)
tree0b66e88b214aeb758d8af93b89563550bc84dba1 /isofs/lookup.c
parentfe1d2dbb9600251cc9fceb02251be194102aa5d0 (diff)
2000-11-26 Marcus Brinkmann <marcus@gnu.org>
Closes Debian Bug #68417: * rr.c (rrip_work): In helper function add_comp set targused to zero after malloc, and loop over realloc in case doubling is not enough. After finalizing the link, set VALID_SL valid flag. * inode.c (read_disknode): For links use rl->target instead rl->name. Closes Debian Bug #69281: Don't use file_start as inode numbers, but the offset of the directory record in disk_image. This is what Linux 2.4 does. * isofs.h (struct disknode): New member struct dirrect *dr. * inode.c: Fix comment about inode numbers. (struct node_cache): Fix comment about file_start (it's not unique). In fact, file_start is invalid for symlinks, and only stored here for convenience. Maybe caching file_start can be avoided by rearranging the code. (inode_cache_find): Change first argument from off_t file_start to struct dirrect *dr and fix the doc. Compare cached value of DR with this argument, instead FILE_START. (diskfs_cached_lookup): Set DR member of DN. (load_inode): Call inode_cache_find with RECORD instead FILE_START. Set DR member of DN. (read_disknode): Set inode number to DR - DISK_IMAGE instead FILE_START. * lookup.c (diskfs_get_directs): Remove variable file_start. Don't calculate file_start. Set D_FILENO to EP - DISK_IMAGE instead FILE_START.
Diffstat (limited to 'isofs/lookup.c')
-rw-r--r--isofs/lookup.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/isofs/lookup.c b/isofs/lookup.c
index 6c259769..e6d2caf4 100644
--- a/isofs/lookup.c
+++ b/isofs/lookup.c
@@ -293,7 +293,6 @@ diskfs_get_directs (struct node *dp,
struct rrip_lookup rr;
const char *name;
size_t namlen, reclen;
- off_t file_start;
ep = (struct dirrect *) bufp;
@@ -354,16 +353,7 @@ diskfs_get_directs (struct node *dp,
/* Fill in entry */
- err = calculate_file_start (ep, &file_start, &rr);
- if (err)
- {
- diskfs_end_catch_exception ();
- if (ouralloc)
- munmap (*data, allocsize);
- return err;
- }
-
- userp->d_fileno = file_start;
+ userp->d_fileno = (ino_t) ((void *) ep - (void *) disk_image);
userp->d_type = DT_UNKNOWN;
userp->d_reclen = reclen;
userp->d_namlen = namlen;