]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/adouble.h
increase the number of open forks.
[netatalk.git] / include / atalk / adouble.h
index 56d392a117b10f1135838475b2011febc495df32..271d59eaac27cbb067f2ff769248f92ba8a2cbe4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: adouble.h,v 1.26 2005-05-14 12:54:55 didg Exp $
+ * $Id: adouble.h,v 1.29 2005-09-28 09:46:37 didg Exp $
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
@@ -254,6 +254,9 @@ struct adouble {
     off_t               ad_rlen;     /* ressource fork len with AFP 3.0
                                         the header parameter size is too small.
                                      */
+    char                *ad_m_name;   /* mac name for open fork */
+    int                 ad_m_namelen;
+
     char                *(*ad_path)(const char *, int);
     int                 (*ad_mkrf)(char *);
                            
@@ -275,6 +278,8 @@ struct adouble {
 /* adouble v2 cnid cache */
 #define ADVOL_NODEV      (1 << 0)   
 #define ADVOL_CACHE      (1 << 1)
+/* adouble unix priv */
+#define ADVOL_UNIXPRIV   (1 << 2)   
 
 /* lock flags */
 #define ADLOCK_CLR      (0)
@@ -417,7 +422,8 @@ extern int ad_metadata    __P((const char *, int, struct adouble *));
 #define ad_flush_metadata(adp) ad_flush( (adp), ADFLAGS_HF)
 #define ad_close_metadata(adp) ad_close( (adp), ADFLAGS_HF)
 
-/* extend header to RW if R or W (W if R for locking),
+/* build a resource fork mode from the data fork mode:
+ * remove X mode and extend header to RW if R or W (W if R for locking),
  */ 
 #ifndef ATACC
 #ifndef __inline__
@@ -425,9 +431,7 @@ extern int ad_metadata    __P((const char *, int, struct adouble *));
 #endif
 static __inline__ mode_t ad_hf_mode (mode_t mode)
 {
-#if 0
-    mode |= S_IRUSR;
-#endif    
+    mode &= ~(S_IXUSR | S_IXGRP | S_IXOTH);
     /* fnctl lock need write access */
     if ((mode & S_IRUSR))
         mode |= S_IWUSR;