]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/volume.h
Fix EA support detection. New ea option values none and auto
[netatalk.git] / include / atalk / volume.h
index 64c5e962a54fe268ae30a2bb421ef4a96ce53f3c..b03020f031475f22067cd68eafc5ae12cf79c0a0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.h,v 1.1 2009-10-02 09:32:41 franklahm Exp $
+ * $Id: volume.h,v 1.9 2009-12-18 19:18:40 franklahm Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 #include <atalk/unicode.h>
 #include <atalk/cnid.h>
 #include <atalk/hash.h>
+#include <atalk/vfs.h>
 
 #define AFPVOL_U8MNAMELEN   255 /* AFP3 sepc */
 #define AFPVOL_MACNAMELEN    27 /* AFP2 spec */
 
 struct vol {
     struct vol         *v_next;
-    char        *v_localname;   /* as defined in AppleVolumes.default */
-    ucs2_t             *v_u8mname;     /* converted to utf8-mac in ucs2 */
-    ucs2_t             *v_macname;     /* mangled to legacy longname in ucs2 */
-    ucs2_t             *v_name;        /* either v_u8mname or v_macname */
+    u_int16_t          v_vid;
+    int                        v_flags;
+
     char               *v_path;
     
     struct dir         *v_dir, *v_root;
+    struct dir                 *v_curdir;      /* cache */
+
     hash_t             *v_hash;
-    int                        v_flags;
-#ifdef __svr4__
-    int                        v_qfd;
-#endif /*__svr4__*/
-    char               *v_gvs;
     time_t             v_mtime;
-    time_t             v_ctime;  /* volume creation date, not unix ctime */
 
-    u_int16_t          v_vid;
-    void                *v_nfsclient;
-    int                 v_nfs;
-    
-    int                 v_casefold;
+    charset_t          v_volcharset;   
+    charset_t          v_maccharset;
+
+    u_int16_t          v_mtou_flags;    /* flags for convert_charset in mtoupath */
+    u_int16_t          v_utom_flags;
+
+    long               v_kTextEncoding; /* mac charset encoding in network order 
+                                         * XXX should be a u_int32_t ?
+                                         */
     size_t              max_filename;
     
-    char                *v_password;
     char                *v_veto;
 
-    char                *v_cnidscheme;
-    char                *v_dbpath;
-    dev_t               v_dev;              /* Unix volume device */
+    int                 v_adouble;    /* default adouble format */
+    int                 v_ad_options; /* adouble option NODEV, NOCACHE, etc.. */
+    char                *(*ad_path)(const char *, int);
+
     struct _cnid_db     *v_cdb;
     char                v_stamp[ADEDLEN_PRIVSYN];
     mode_t             v_umask;
@@ -62,19 +62,42 @@ struct vol {
     char               *v_forcegid;
 #endif 
 
+    /* adouble indirection */
+    struct vfs_ops      *vfs;   /* pointer to vfs_master_funcs for chaining */
+    const struct vfs_ops *vfs_modules[4];
+    int                 v_vfs_ea;       /* The AFPVOL_EA_xx flag */
+
+    ucs2_t             *v_u8mname;     /* converted to utf8-mac in ucs2 */
+    ucs2_t             *v_macname;     /* mangled to legacy longname in ucs2 */
+    ucs2_t             *v_name;        /* either v_u8mname or v_macname */
+
+    /* get/set volparams */
+    time_t             v_ctime;  /* volume creation date, not unix ctime */
+
+    dev_t               v_dev;    /* Unix volume device, Set but not used */
+
+#ifdef __svr4__
+    int                        v_qfd;
+#endif /*__svr4__*/
+    char               *v_gvs;
+    void                *v_nfsclient;
+    int                 v_nfs;
+    
+    /* only when opening/closing volumes or in error */
+    int                 v_casefold;
+
+    char               *v_localname;   /* as defined in AppleVolumes.default */
     char                *v_volcodepage;
-    charset_t          v_volcharset;   
-    struct charset_functions   *v_vol;
     char               *v_maccodepage;
-    charset_t          v_maccharset;
-    struct charset_functions   *v_mac;
 
-    int                 v_deleted;    /* volume open but deleted in new config file */
+    char                *v_password;
+
+    char                *v_cnidscheme;
+    char                *v_dbpath;
+
     int                 v_hide;       /* new volume wait until old volume is closed */
     int                 v_new;        /* volume deleted but there's a new one with the same name */
-    int                 v_adouble;    /* default adouble format */
-    int                 v_ad_options; /* adouble option NODEV, NOCACHE, etc.. */
-
+    int                 v_deleted;    /* volume open but deleted in new config file */
     char                *v_root_preexec;
     char                *v_preexec;
 
@@ -84,11 +107,6 @@ struct vol {
     int                 v_root_preexec_close;
     int                 v_preexec_close;
     
-    /* adouble indirection */
-    struct vfs_ops      *vfs;
-    int                 v_vfs_ea;       /* The AFPVOL_EA_xx flag */
-    int                 (*validupath)(const struct vol *, const char *);
-    char                *(*ad_path)(const char *, int);
 };
 
 #ifdef NO_LARGE_VOL_SUPPORT
@@ -139,8 +157,10 @@ this is going away. */
 #define AFPVOL_ACLS      (1 << 25)   /* Volume supports ACLS */
 
 /* Extended Attributes vfs indirection  */
-#define AFPVOL_EA_AD             0   /* Store them in adouble files. Default. */
-#define AFPVOL_EA_SOLARIS        1   /* Store them in native Solaris EAs */
+#define AFPVOL_EA_NONE           0   /* No EAs */
+#define AFPVOL_EA_AUTO           1   /* try sys, fallback to ad (default) */
+#define AFPVOL_EA_SYS            2   /* Store them in native EAs */
+#define AFPVOL_EA_AD             3   /* Store them in adouble files */
 
 /* FPGetSrvrParms options */
 #define AFPSRVR_CONFIGINFO     (1 << 0)