/[hurd]/hurd/ufs/dir.c
ViewVC logotype

Diff of /hurd/ufs/dir.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.43 by roland, Wed May 8 09:59:52 2002 UTC revision 1.44 by roland, Tue Jun 11 21:40:58 2002 UTC
# Line 379  dirscanblock (vm_address_t blockaddr, st Line 379  dirscanblock (vm_address_t blockaddr, st
379            || DIRSIZ (DIRECT_NAMLEN (entry)) > read_disk_entry (entry->d_reclen)            || DIRSIZ (DIRECT_NAMLEN (entry)) > read_disk_entry (entry->d_reclen)
380            || memchr (entry->d_name, '\0', DIRECT_NAMLEN (entry)))            || memchr (entry->d_name, '\0', DIRECT_NAMLEN (entry)))
381          {          {
382            fprintf (stderr, "Bad directory entry: inode: %d offset: %zd\n",            fprintf (stderr, "Bad directory entry: inode: %Ld offset: %zd\n",
383                    dp->dn->number, currentoff - blockaddr + idx * DIRBLKSIZ);                    dp->dn->number, currentoff - blockaddr + idx * DIRBLKSIZ);
384            return ENOENT;            return ENOENT;
385          }          }
# Line 502  diskfs_direnter_hard(struct node *dp, Line 502  diskfs_direnter_hard(struct node *dp,
502    vm_address_t fromoff, tooff;    vm_address_t fromoff, tooff;
503    int totfreed;    int totfreed;
504    error_t err;    error_t err;
505    off_t oldsize = 0;    size_t oldsize = 0;
506    
507    assert (ds->type == CREATE);    assert (ds->type == CREATE);
508    
# Line 585  diskfs_direnter_hard(struct node *dp, Line 585  diskfs_direnter_hard(struct node *dp,
585        assert (needed <= DIRBLKSIZ);        assert (needed <= DIRBLKSIZ);
586    
587        oldsize = dp->dn_stat.st_size;        oldsize = dp->dn_stat.st_size;
588          if ((off_t)(oldsize + DIRBLKSIZ) != dp->dn_stat.st_size)
589            {
590              /* We can't possibly map the whole directory in.  */
591              munmap ((caddr_t) ds->mapbuf, ds->mapextent);
592              return EOVERFLOW;
593            }
594        while (oldsize + DIRBLKSIZ > dp->allocsize)        while (oldsize + DIRBLKSIZ > dp->allocsize)
595          {          {
596            err = diskfs_grow (dp, oldsize + DIRBLKSIZ, cred);            err = diskfs_grow (dp, oldsize + DIRBLKSIZ, cred);

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26