[OpenAFS-port-darwin] Darwin patch

Ted McCabe ted@MIT.EDU
Thu, 10 May 2001 12:46:25 -0400 (EDT)


I noticed that when I tried copying files out of AFS, I would often
not be able to modify the destination files/dirs due to the user flags
being non-zero (see man chflags).  Turns out that not all of the
fields of Darwin's struct vattr were being set in afs_CopyOutAttrs

This patch clears the va_flags entry. I wasn't sure how the
va_filerev and va_gen fields are precisely used, but since I wasn't
noticing any trouble I could attribute to them, I left them
unspecified.  I suspect someone with more knowledge can say for sure.

   --Ted

*** src.104/afs/VNOPS/afs_vnop_attrs.c	Mon Apr 23 03:28:58 2001
--- src/afs/VNOPS/afs_vnop_attrs.c	Thu May 10 11:34:25 2001
***************
*** 128,134 ****
       * Below return 0 (and not 1) blocks if the file is zero length. This conforms
       * better with the other filesystems that do return 0.	
       */
! #ifdef	AFS_OSF_ENV
  #ifdef	va_size_rsv
      attrs->va_size_rsv = 0;
  #endif
--- 128,134 ----
       * Below return 0 (and not 1) blocks if the file is zero length. This conforms
       * better with the other filesystems that do return 0.	
       */
! #if	defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV)
  #ifdef	va_size_rsv
      attrs->va_size_rsv = 0;
  #endif