/*
- * $Id: volume.h,v 1.16 2010/03/31 09:47:32 franklahm Exp $
- *
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifndef ATALK_VOLUME_H
#define ATALK_VOLUME_H 1
-#include <sys/cdefs.h>
+#include <stdint.h>
#include <sys/types.h>
-#include <netatalk/endian.h>
#include <atalk/unicode.h>
#include <atalk/cnid.h>
#define AFPVOL_U8MNAMELEN 255 /* AFP3 sepc */
#define AFPVOL_MACNAMELEN 27 /* AFP2 spec */
-typedef off_t VolSpace;
+typedef uint64_t VolSpace;
struct vol {
struct vol *v_next;
- u_int16_t v_vid;
+ uint16_t v_vid;
int v_flags;
char *v_path;
struct dir *v_root;
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;
+ uint16_t v_mtou_flags; /* flags for convert_charset in mtoupath */
+ uint16_t v_utom_flags;
long v_kTextEncoding; /* mac charset encoding in network order
* FIXME: should be a u_int32_t ? */
size_t max_filename;
char *v_veto;
int v_adouble; /* adouble format: v1, v2, sfm ... */
int v_ad_options; /* adouble option NODEV, NOCACHE, etc.. */
- char *(*ad_path)(const char *, int);
+ const char *(*ad_path)(const char *, int);
struct _cnid_db *v_cdb;
char v_stamp[ADEDLEN_PRIVSYN];
VolSpace v_limitsize; /* Size limit, if any, in MiB */
char *v_gvs;
void *v_nfsclient;
int v_nfs;
- off_t v_tm_used; /* used bytes on a TM volume */
+ VolSpace v_tm_used; /* used bytes on a TM volume */
time_t v_tm_cachetime; /* time at which v_tm_used was calculated last */
- off_t v_written; /* amount of data written in afp_write, reset every time a FCE_TM_SIZE event is sent */
+ VolSpace v_appended; /* amount of data appended to files */
/* only when opening/closing volumes or in error */
int v_casefold;
int v_root_preexec_close;
int v_preexec_close;
char *v_uuid; /* For TimeMachine zeroconf record */
-#ifdef FORCE_UIDGID
- char *v_forceuid;
- char *v_forcegid;
-#endif
#ifdef __svr4__
int v_qfd;
#endif /*__svr4__*/
#define AFPVOL_USEDOTS (1 << 11) /* use real dots */
#define AFPVOL_LIMITSIZE (1 << 12) /* limit size for older macs */
#define AFPVOL_MAPASCII (1 << 13) /* map the ascii range as well */
-#define AFPVOL_DROPBOX (1 << 14) /* dropkludge dropbox support */
#define AFPVOL_NOFILEID (1 << 15) /* don't advertise createid resolveid and deleteid calls */
#define AFPVOL_NOSTAT (1 << 16) /* advertise the volume even if we can't stat() it
* maybe because it will be mounted later in preexec */
#define utf8_encoding() (afp_version >= 30)
-#define vol_noadouble(vol) (((vol)->v_flags & AFPVOL_NOADOUBLE) ? 1 : 0)
+#define vol_noadouble(vol) ((((vol)->v_flags & AFPVOL_NOADOUBLE) \
+ || ((vol)->v_adouble & AD_VERSION_EA)) ? 1 : 0)
#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_inv_dots(vol) (((vol)->v_flags & AFPVOL_INV_DOTS) ? 1 : 0)