Index: winsup/cygwin/fhandler_disk_file.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_disk_file.cc,v
retrieving revision 1.382
diff -r1.382 fhandler_disk_file.cc
182,183c182,190
<    IO_REPARSE_TAG_SYMLINK types are always symlinks.  We don't know
<    anything about other reparse points, so they are treated as unknown.  */
---
>    IO_REPARSE_TAG_SYMLINK types are always symlinks.
>
>    IO_REPARSE_TAG_OPENAFS_DFS is either an AFS Mount Point or an AFS
>    Symlink to either a directory or a file.  Mount Points are treated
>    as directories and Symlinks are treated as symlinks.
>
>    We don't know anything about other reparse points, so they are treated
>    as unknown.  */
>
216c223,239
<           ret = DT_LNK;
---
>             {
>             ret = DT_LNK;
>             }
>           else if ((rp->ReparseTag & 0x0000FFFF) == IO_REPARSE_TAG_OPENAFS_DFS)
>             {
>               PREPARSE_GUID_DATA_BUFFER guidrp = (PREPARSE_GUID_DATA_BUFFER) rp;
>               AFSReparseTagInfo *afsrp = (AFSReparseTagInfo *)guidrp->GenericReparseBuffer.DataBuffer;
>
>               if (afsrp->SubTag == OPENAFS_SUBTAG_MOUNTPOINT)
>                 {
>                   ret = DT_DIR;
>                 }
>               else
>                 {
>                   ret = DT_LNK;
>                 }
>             }
Index: winsup/cygwin/path.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
retrieving revision 1.671
diff -r1.671 path.cc
2035a2036,2064
>
>   else if ((rp->ReparseTag & 0x0000FFFF) == IO_REPARSE_TAG_OPENAFS_DFS)
>     {
>      /*
>       * An AFS mount point is a volume mount point that is handled
>       * by the underlying file system.  Cygwin can treat it as a
>       * directory.
>       */
>
>       PREPARSE_GUID_DATA_BUFFER guidrp = (PREPARSE_GUID_DATA_BUFFER) rp;
>       AFSReparseTagInfo *afsrp = (AFSReparseTagInfo *)guidrp->GenericReparseBuffer.DataBuffer;
>
>       switch (afsrp->SubTag)
>         {
>         case OPENAFS_SUBTAG_MOUNTPOINT:
>            /* target is a different volume */
>            return -1;
>         case OPENAFS_SUBTAG_SYMLINK:
>            RtlInitCountedUnicodeString (&subst,
>                 afsrp->AFSSymLink.Buffer,
>                 afsrp->AFSSymLink.SymLinkTargetLength);
>            break;
>         case OPENAFS_SUBTAG_UNC:
>            RtlInitCountedUnicodeString (&subst,
>                 afsrp->UNCReferral.Buffer,
>                 afsrp->UNCReferral.UNCTargetLength);
>            break;
>         }
>     }
2040a2070,2076
>
>       /* FIXME!!! This is wrong.  It is not safe to drop the attribute bit.
>          If the path will not be treated as a reparse point it is critical
>          that the file size and attributes of the target object be obtained
>          instead of using the size and attributes of the reparse point.
>        */
>
Index: winsup/cygwin/path.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/path.h,v
retrieving revision 1.176
diff -r1.176 path.h
455a456,503
>
> /* FIXME: Move to own file?  AFS data types */
>
> #ifndef IO_REPARSE_TAG_OPENAFS_DFS
> #define IO_REPARSE_TAG_OPENAFS_DFS              0x00000037L
> #endif
>
> /*
> ** Reparse tag AFS Specific information buffer
> **/
>
> #define OPENAFS_SUBTAG_MOUNTPOINT 1
> #define OPENAFS_SUBTAG_SYMLINK    2
> #define OPENAFS_SUBTAG_UNC        3
>
> #define OPENAFS_MOUNTPOINT_TYPE_NORMAL   L'#'
> #define OPENAFS_MOUNTPOINT_TYPE_RW       L'%'
>
> typedef struct _AFS_REPARSE_TAG_INFORMATION
> {
>
>     ULONG SubTag;
>
>     union
>     {
>         struct
>         {
>             ULONG  Type;
>             USHORT MountPointCellLength;
>             USHORT MountPointVolumeLength;
>             WCHAR  Buffer[1];
>         } AFSMountPoint;
>
>         struct
>         {
>             BOOLEAN RelativeLink;
>             USHORT  SymLinkTargetLength;
>             WCHAR   Buffer[1];
>         } AFSSymLink;
>
>         struct
>         {
>             USHORT UNCTargetLength;
>             WCHAR  Buffer[1];
>         } UNCReferral;
>     };
>
> } AFSReparseTagInfo;
