/[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.42 by marcus, Sun Jan 7 19:31:50 2001 UTC revision 1.43 by roland, Wed May 8 09:59:52 2002 UTC
# Line 1  Line 1 
1  /* Directory management routines  /* Directory management routines
2     Copyright (C) 1994,95,96,97,98,99,2000 Free Software Foundation, Inc.     Copyright (C) 1994,95,96,97,98,99,2000,02 Free Software Foundation, Inc.
3    
4     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
5     modify it under the terms of the GNU General Public License as     modify it under the terms of the GNU General Public License as
# 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: %d\n",            fprintf (stderr, "Bad directory entry: inode: %d 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 729  diskfs_dirempty(struct node *dp, Line 729  diskfs_dirempty(struct node *dp,
729                  struct protid *cred)                  struct protid *cred)
730  {  {
731    struct directory_entry *entry;    struct directory_entry *entry;
732    int curoff;    vm_address_t buf, curoff;
   vm_address_t buf;  
733    memory_object_t memobj;    memory_object_t memobj;
734    error_t err;    error_t err;
735    
# Line 798  diskfs_drop_dirstat (struct node *dp, st Line 797  diskfs_drop_dirstat (struct node *dp, st
797  static error_t  static error_t
798  count_dirents (struct node *dp, int nb, char *buf)  count_dirents (struct node *dp, int nb, char *buf)
799  {  {
800    int amt;    size_t amt;
801    char *offinblk;    char *offinblk;
802    struct directory_entry *entry;    struct directory_entry *entry;
803    int count = 0;    int count = 0;
# Line 833  diskfs_get_directs (struct node *dp, Line 832  diskfs_get_directs (struct node *dp,
832                      int entry,                      int entry,
833                      int nentries,                      int nentries,
834                      char **data,                      char **data,
835                      u_int *datacnt,                      size_t *datacnt,
836                      vm_size_t bufsiz,                      vm_size_t bufsiz,
837                      int *amt)                      int *amt)
838  {  {
# Line 848  diskfs_get_directs (struct node *dp, Line 847  diskfs_get_directs (struct node *dp,
847    char *datap;    char *datap;
848    struct directory_entry *entryp;    struct directory_entry *entryp;
849    int allocsize;    int allocsize;
850    int checklen;    size_t checklen;
851    struct dirent *userp;    struct dirent *userp;
852    
853    nblks = dp->dn_stat.st_size/DIRBLKSIZ;    nblks = dp->dn_stat.st_size/DIRBLKSIZ;

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

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