• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/netatalk-2.2.5/libatalk/vfs/

Lines Matching refs:vol

51 typedef int (*rf_loop)(const struct vol *, struct dirent *, char *, void *, int);
55 for_each_adouble(const char *from, const char *name, rf_loop fn, const struct vol *vol, void *data, int flag)
81 if (fn && (ret = fn(vol, de, buf, data, flag))) {
107 if (!(vol->v_flags & AFPVOL_USEDOTS))
119 ad_p = vol->ad_path(path, ADFLAGS_HF );
134 static int deletecurdir_adouble_loop(const struct vol *vol, struct dirent *de, char *name, void *data _U_, int flag _U_)
157 if ((err = for_each_adouble("deletecurdir", ".AppleDouble", deletecurdir_adouble_loop, vol, NULL, 1)))
163 static int adouble_setfilmode(const struct vol *vol, const char *name, mode_t mode, struct stat *st)
165 return setfilmode(vol, name, ad_hf_mode(mode), st);
170 return adouble_setfilmode(vol, vol->ad_path(name, ADFLAGS_HF ), mode, st);
176 char *adouble = vol->ad_path(name, ADFLAGS_DIR );
177 int dropbox = vol->v_flags;
180 if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox, vol->v_umask) < 0 )
184 if (adouble_setfilmode(vol, vol->ad_path(name, ADFLAGS_DIR ), mode, st) < 0)
188 if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox, vol->v_umask) < 0 )
195 static int setdirmode_adouble_loop(const struct vol *vol, struct dirent *de _U_, char *name, void *data, int flag)
200 if (ostat(name, &st, vol_syml_opt(vol)) < 0 ) {
206 if (setfilmode(vol, name, hf_mode, &st) < 0) {
215 int dropbox = vol->v_flags;
217 char *adouble = vol->ad_path(name, ADFLAGS_DIR );
221 if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox, vol->v_umask) < 0)
225 if (for_each_adouble("setdirmode", adouble_p, setdirmode_adouble_loop, vol, &hf_mode, vol_noadouble(vol)))
229 if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox, vol->v_umask) < 0)
236 static int setdirowner_adouble_loop(const struct vol *vol, struct dirent *de _U_, char *name, void *data, int flag _U_)
250 int noadouble = vol_noadouble(vol);
258 adouble_p = ad_dir(vol->ad_path(name, ADFLAGS_DIR ));
260 if (for_each_adouble("setdirowner", adouble_p, setdirowner_adouble_loop, vol, &owner, noadouble))
283 return netatalk_unlinkat(dirfd, vol->ad_path(file, ADFLAGS_HF));
292 strcpy( adsrc, vol->ad_path(src, 0 ));
293 if (unix_rename(dirfd, adsrc, -1, vol->ad_path(dst, 0 )) < 0) {
300 if (ostatat(dirfd, adsrc, &st, vol_syml_opt(vol))) /* source has no ressource fork, */
310 ad_init(&ad, vol->v_adouble, vol->v_ad_options);
313 if (!unix_rename(dirfd, adsrc, -1, vol->ad_path(dst, 0 )) )
331 /* const struct vol *vol, int sfd, const char *src, const char *dst */
407 if ((acl(vol->ad_path(path, ADFLAGS_DIR), cmd, count, aces)) != 0)
411 if ((acl(vol->ad_path(path, ADFLAGS_HF), cmd, count, aces)) != 0)
428 if ((ret = remove_acl_vfs(vol->ad_path(path, ADFLAGS_DIR))) != AFP_OK)
435 if ((ret = remove_acl_vfs(vol->ad_path(path, ADFLAGS_HF))) != AFP_OK)
459 EC_ZERO_LOG(acl_set_file(vol->ad_path(path, ADFLAGS_DIR), type, acl));
462 EC_ZERO_LOG(acl_set_file(vol->ad_path(path, ADFLAGS_HF), type, acl));
482 EC_ZERO_LOG_ERR(remove_acl_vfs(vol->ad_path(path, ADFLAGS_DIR)), AFPERR_MISC);
488 EC_ZERO_LOG_ERR(remove_acl_vfs(vol->ad_path(path, ADFLAGS_HF)), AFPERR_MISC);
499 static int ads_chown_loop(const struct vol *vol, struct dirent *de _U_, char *name, void *data, int flag _U_)
519 ad_p = ad_dir(vol->ad_path(path, ADFLAGS_HF ));
529 return for_each_adouble("chown_ads", ad_p, ads_chown_loop, vol, &owner, 1);
533 static int deletecurdir_ads1_loop(const struct vol *vol _U_, struct dirent *de _U_, char *name, void *data _U_, int flag _U_)
554 static int deletecurdir_ads_loop(const struct vol *vol, struct dirent *de, char *name, void *data _U_, int flag _U_)
572 if ((err = for_each_adouble("deletecurdir", ".AppleDouble", deletecurdir_ads_loop, vol, NULL, 1)))
584 static int ads_setfilmode_loop(const struct vol *vol, struct dirent *de _U_, char *name, void *data, int flag _U_)
588 return setfilmode(vol, name, param->mode, NULL);
591 static int ads_setfilmode(const struct vol *vol, const char * name, mode_t mode, struct stat *st)
608 if (ochmod(name, dir_mode, st, vol_syml_opt(vol) | O_NETATALK_ACL) < 0)
611 if (ochmod(name, dir_mode, st, vol_syml_opt(vol)) < 0)
617 if (for_each_adouble("setfilmode_ads", name, ads_setfilmode_loop, vol, &param, 0) < 0)
622 if (ochmod(name, dir_mode, st, vol_syml_opt(vol) | O_NETATALK_ACL) < 0)
625 if (ochmod(name, dir_mode, st, vol_syml_opt(vol)) < 0)
635 return ads_setfilmode(vol, ad_dir(vol->ad_path(name, ADFLAGS_HF )), mode, st);
641 char *adouble = vol->ad_path(name, ADFLAGS_DIR );
643 int dropbox = vol->v_flags;
650 if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, dropbox, vol->v_umask) < 0)
654 if (stickydirmode(ad_p, DIRBITS | mode, dropbox, vol->v_umask) < 0)
658 if (ads_setfilmode(vol, ad_dir(vol->ad_path(name, ADFLAGS_DIR)), mode, st) < 0)
662 if (stickydirmode(ad_p, DIRBITS | mode, dropbox, vol->v_umask) < 0)
664 if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, dropbox, vol->v_umask) < 0)
676 static int setdirmode_ads_loop(const struct vol *vol, struct dirent *de _U_, char *name, void *data, int flag)
683 if (stickydirmode(name, DIRBITS | param->mode, param->dropbox, vol->v_umask) < 0) {
690 if (ads_setfilmode(vol, name, param->mode, NULL) < 0)
694 if (stickydirmode(name, DIRBITS | param->mode, param->dropbox, vol->v_umask) < 0) {
706 char *adouble = vol->ad_path(name, ADFLAGS_DIR );
711 param.dropbox = vol->v_flags;
717 if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, param.dropbox, vol->v_umask) < 0)
721 if (for_each_adouble("setdirmode_ads", ad_dir(ad_p), setdirmode_ads_loop, vol, &param, vol_noadouble(vol)))
725 if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, param.dropbox, vol->v_umask) < 0 )
732 static int setdirowner_ads1_loop(const struct vol *vol _U_, struct dirent *de _U_, char *name, void *data, int flag _U_)
744 static int setdirowner_ads_loop(const struct vol *vol, struct dirent *de _U_, char *name, void *data, int flag)
748 if (for_each_adouble("setdirowner", name, setdirowner_ads1_loop, vol, data, flag) < 0)
761 int noadouble = vol_noadouble(vol);
769 strlcpy(adouble_p, ad_dir(vol->ad_path(name, ADFLAGS_DIR )), sizeof(adouble_p));
771 if (for_each_adouble("setdirowner", ad_dir(adouble_p), setdirowner_ads_loop, vol, &owner, noadouble))
798 ad_p = ad_dir(vol->ad_path(file, ADFLAGS_HF ));
827 strcpy( adsrc, ad_dir(vol->ad_path(src, 0 )));
828 if (unix_rename(dirfd, adsrc, -1, ad_dir(vol->ad_path(dst, 0 ))) < 0) {
835 if (ostatat(dirfd, adsrc, &st, vol_syml_opt(vol))) /* source has no ressource fork, */
845 ad_init(&ad, vol->v_adouble, vol->v_ad_options);
850 RF_deletefile_ads(vol, -1, dst );
851 if (!unix_rename(dirfd, adsrc, -1, ad_dir(vol->ad_path(dst, 0 ))) )
874 (vol->v_flags & AFPVOL_USEDOTS) ? netatalk_name(name): name[0] != '.');
882 return unix_rename(dirfd, vol->ad_path(oldpath,0), -1, strcat(tempbuf,newpath));
888 return netatalk_unlink( vol->ad_path(".",0) );
894 return adouble_setfilmode(vol, vol->ad_path(name, ADFLAGS_DIR), mode, st);
915 strcpy( adsrc, vol->ad_path(src, 0 ));
917 if (unix_rename(dirfd, adsrc, -1, vol->ad_path(dst, 0 )) < 0) {
921 if (errno == ENOENT && ostatat(dirfd, adsrc, &st, vol_syml_opt(vol))) /* source has no ressource fork, */
952 while (vol->vfs_modules[i]) { \
953 if (vol->vfs_modules[i]->vfs_ ## name) { \
954 err = vol->vfs_modules[i]->vfs_ ## name (vars); \
985 return vol->vfs_modules[0]->vfs_validupath(VFS_FUNC_VARS_VALIDUPATH);
989 * These function pointers get called from the lib users via vol->vfs->func.
1158 void initvol_vfs(struct vol *vol)
1160 vol->vfs = &vfs_master_funcs;
1163 if (vol->v_adouble == AD_VERSION2_OSX) {
1164 vol->vfs_modules[0] = &netatalk_adouble_osx;
1165 vol->ad_path = ad_path_osx;
1167 else if (vol->v_adouble == AD_VERSION1_SFM) {
1168 vol->vfs_modules[0] = &netatalk_adouble_sfm;
1169 vol->ad_path = ad_path_sfm;
1172 vol->vfs_modules[0] = &netatalk_adouble;
1173 vol->ad_path = ad_path;
1177 if (vol->v_vfs_ea == AFPVOL_EA_SYS) {
1179 vol->vfs_modules[1] = &netatalk_ea_sys;
1180 } else if (vol->v_vfs_ea == AFPVOL_EA_AD) {
1182 vol->vfs_modules[1] = &netatalk_ea_adouble;
1189 vol->vfs_modules[2] = &netatalk_solaris_acl_adouble;
1192 vol->vfs_modules[2] = &netatalk_posix_acl_adouble;