apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: apr/file_io/os2 filestat.c
Date Mon, 31 Mar 2003 12:31:40 GMT
bjh         2003/03/31 04:31:40

  Modified:    file_io/os2 filestat.c
  Log:
  OS/2: apr_stat() fixes
  - When a character device is stat'ed, fill in finfo.name if it was asked for.
  - return APR_INCOMPLETE when appropriate.
  
  Revision  Changes    Path
  1.35      +9 -5      apr/file_io/os2/filestat.c
  
  Index: filestat.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/os2/filestat.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- filestat.c	7 Jan 2003 00:52:51 -0000	1.34
  +++ filestat.c	31 Mar 2003 12:31:40 -0000	1.35
  @@ -186,17 +186,21 @@
                   finfo->valid |= APR_FINFO_NAME;
               }
           }
  -
  -        return APR_SUCCESS;
       } else if (rc == ERROR_INVALID_ACCESS) {
           memset(finfo, 0, sizeof(apr_finfo_t));
           finfo->valid = APR_FINFO_TYPE | APR_FINFO_PROT;
           finfo->protection = 0666;
           finfo->filetype = APR_CHR;
  -        return APR_SUCCESS;
  +
  +        if (wanted & APR_FINFO_NAME) {
  +            finfo->name = apr_pstrdup(cont, fname);
  +            finfo->valid |= APR_FINFO_NAME;
  +        }
  +    } else {
  +        return APR_FROM_OS_ERROR(rc);
       }
  -    
  -    return APR_FROM_OS_ERROR(rc);
  +
  +    return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
   }
   
   
  
  
  

Mime
View raw message