X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=include%2Fatalk%2Fvolinfo.h;h=5c7a59974b357663d356dadd856f42c96537cb89;hp=541f28733ec14dccc0e2e2e19acb593be8eae8dc;hb=b684c667e321c2b6bd5f949dc751ded276e11020;hpb=b0ae2ebd95b7de8a893bcd996577d104eb3d66b4 diff --git a/include/atalk/volinfo.h b/include/atalk/volinfo.h index 541f2873..5c7a5997 100644 --- a/include/atalk/volinfo.h +++ b/include/atalk/volinfo.h @@ -1,54 +1,22 @@ /* - * $Id: volinfo.h,v 1.8 2009-10-02 09:32:41 franklahm Exp $ + * $Id: volinfo.h,v 1.9 2009-12-01 16:36:14 franklahm Exp $ */ #ifndef _ATALK_VOLINFO_H #define _ATALK_VOLINFO_H 1 #include - -/* FIXME: following duplicated from etc/afpd/volume.h */ - -/* flags that alter volume behaviour. */ -#define AFPVOL_A2VOL (1 << 5) /* prodos volume */ -#define AFPVOL_CRLF (1 << 6) /* cr/lf translation */ -#define AFPVOL_NOADOUBLE (1 << 7) /* don't create .AppleDouble by default */ -#define AFPVOL_RO (1 << 8) /* read-only volume */ -#define AFPVOL_MSWINDOWS (1 << 9) /* deal with ms-windows yuckiness. this is going away. */ -#define AFPVOL_NOHEX (1 << 10) /* don't do :hex translation */ -#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 AFPVOL_UNIX_PRIV (1 << 17) /* support unix privileges */ -#define AFPVOL_NODEV (1 << 18) /* always use 0 for device number in cnid calls - * help if device number is notconsistent across reboot - * NOTE symlink to a different device will return an ACCESS error */ -#define AFPVOL_CASEINSEN (1 << 19) /* volume is case insensitive */ -#define AFPVOL_EILSEQ (1 << 20) /* encode illegal sequence 'asis' UCS2, ex "\217-", which is not - a valid SHIFT-JIS char, is encoded as U\217 -*/ -#define AFPVOL_CACHE (1 << 21) /* Use adouble v2 CNID caching, default don't use it */ -#define AFPVOL_INV_DOTS (1 << 22) /* dots files are invisible */ -#define AFPVOL_TM (1 << 24) /* Supports TimeMachine */ -#define AFPVOL_ACLS (1 << 25) /* Volume supports ACLS */ - -/* handle casefolding */ -#define AFPVOL_MTOUUPPER (1 << 0) -#define AFPVOL_MTOULOWER (1 << 1) -#define AFPVOL_UTOMUPPER (1 << 2) -#define AFPVOL_UTOMLOWER (1 << 3) -#define AFPVOL_UMLOWER (AFPVOL_MTOULOWER | AFPVOL_UTOMLOWER) -#define AFPVOL_UMUPPER (AFPVOL_MTOUUPPER | AFPVOL_UTOMUPPER) -#define AFPVOL_UUPPERMLOWER (AFPVOL_MTOUUPPER | AFPVOL_UTOMLOWER) -#define AFPVOL_ULOWERMUPPER (AFPVOL_MTOULOWER | AFPVOL_UTOMUPPER) +#include /* volinfo for shell utilities */ #define VOLINFODIR ".AppleDesktop" #define VOLINFOFILE ".volinfo" +typedef struct { + const u_int32_t option; + const char *name; +} vol_opt_name_t; + struct volinfo { char *v_name; char *v_path; @@ -67,7 +35,11 @@ struct volinfo { int v_dbd_port; }; +extern const vol_opt_name_t vol_opt_names[]; +extern const vol_opt_name_t vol_opt_casefold[]; + extern int loadvolinfo(char *path, struct volinfo *vol); +extern int savevolinfo(const struct vol *vol, const char *Cnid_srv, const char *Cnid_port); extern int vol_load_charsets(struct volinfo *vol); #endif