#include <atalk/cnid.h>
#include <atalk/hash.h>
#include <atalk/vfs.h>
+#include <atalk/globals.h>
#define AFPVOL_U8MNAMELEN 255 /* AFP3 sepc */
#define AFPVOL_MACNAMELEN 27 /* AFP2 spec */
struct vol {
struct vol *v_next;
+ AFPObj *v_obj;
uint16_t v_vid;
int v_flags;
char *v_path;
#endif /*__svr4__*/
};
-#define AFPVOL_OPEN (1<<0)
+/* load_volumes() flags */
+#define LV_ALL (1 << 0)
+/* volume flags */
+#define AFPVOL_OPEN (1<<0)
/* flags for AFS and quota 0xxx0 */
#define AFPVOL_GVSMASK (7<<2)
-#define AFPVOL_NONE (0<<2)
+#define AFPVOL_NONE (0<<2)
#define AFPVOL_AFSGVS (1<<2)
-#define AFPVOL_USTATFS (2<<2)
-#define AFPVOL_UQUOTA (4<<2)
+#define AFPVOL_USTATFS (1<<3)
+#define AFPVOL_UQUOTA (1<<4)
/*
Flags that alter volume behaviour.
Keep in sync with libatalk/util/volinfo.c
*/
+#define AFPVOL_NOV2TOEACONV (1 << 5) /* no adouble:v2 to adouble:ea conversion */
#define AFPVOL_RO (1 << 8) /* read-only volume */
#define AFPVOL_NOHEX (1 << 10) /* don't do :hex translation */
#define AFPVOL_USEDOTS (1 << 11) /* use real dots */
#define VOLPBIT_XBTOTAL 10
#define VOLPBIT_BSIZE 11 /* block size */
-#define utf8_encoding() (afp_version >= 30)
+#define utf8_encoding(obj) ((obj)->afp_version >= 30)
#define vol_nodev(vol) (((vol)->v_flags & AFPVOL_NODEV) ? 1 : 0)
-#define vol_unix_priv(vol) (afp_version >= 30 && ((vol)->v_flags & AFPVOL_UNIX_PRIV))
+#define vol_unix_priv(vol) ((vol)->v_obj->afp_version >= 30 && ((vol)->v_flags & AFPVOL_UNIX_PRIV))
#define vol_inv_dots(vol) (((vol)->v_flags & AFPVOL_INV_DOTS) ? 1 : 0)