• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/netatalk-2.2.0/etc/afpd/

Lines Matching defs:adp

96 void *get_finderinfo(const struct vol *vol, const char *upath, struct adouble *adp, void *data, int islink)
102 if (adp)
103 ad_finder = ad_entry(adp, ADEID_FINDERI);
195 * FIXME: PDINFO is UTF8 and doesn't need adp
217 * @param adp (rw) adouble struct of object upath, might be NULL
224 struct adouble *adp,
238 adcnid = ad_getid(adp, st->st_dev, st->st_ino, 0, vol->v_stamp); /* (1) */
292 else if (adp && (adcnid != dbcnid)) { /* 4 */
293 /* Update the ressource fork. For a folder adp is always null */
296 if (ad_setid(adp, st->st_dev, st->st_ino, dbcnid, did, vol->v_stamp)) {
297 ad_flush(adp);
311 char *buf, size_t *buflen, struct adouble *adp)
340 id = get_id(vol, adp, st, dir->d_did, upath, len);
391 if ( adp ) {
392 ad_getattr(adp, &ashort);
423 if (!adp || (ad_getdate(adp, AD_DATE_CREATE, &aint) < 0))
430 if ( adp && (ad_getdate(adp, AD_DATE_MODIFY, &aint) == 0)) {
442 if (!adp || (ad_getdate(adp, AD_DATE_BACKUP, &aint) < 0))
449 get_finderinfo(vol, upath, adp, (char *)data,S_ISLNK(st->st_mode));
480 if ( adp ) {
481 if (adp->ad_rlen > 0xffffffff)
484 aint = htonl( adp->ad_rlen);
508 if ( adp ) {
509 memcpy(fdType, ad_entry( adp, ADEID_FINDERI ), 4 );
559 if (adp)
560 aint = htonl(adp->ad_rlen >> 32);
563 if (adp)
564 aint = htonl(adp->ad_rlen);
585 if (adp) {
586 memcpy(fdType, ad_entry( adp, ADEID_FINDERI ), 4 );
628 struct adouble ad, *adp;
635 adp = NULL;
641 adp = of_ad(vol, path, &ad);
644 if ( ad_metadata( upath, flags|ADFLAGS_CREATE, adp) < 0 ) {
655 adp = NULL;
660 rc = getmetadata(vol, bitmap, path, dir, buf, buflen, adp);
661 if ( adp ) {
662 ad_close_metadata( adp);
671 struct adouble ad, *adp;
713 adp = of->of_ad;
716 adp = &ad;
734 openf, 0666, adp) < 0 ) {
751 if ( ad_reso_fileno( adp ) == -1 ) { /* Hard META / HF */
754 ad_close( adp, ADFLAGS_DF );
761 ad_close( adp, ADFLAGS_DF );
766 ad_setname(adp, path);
772 ad_close( adp, ADFLAGS_DF|ADFLAGS_HF);
776 (void)get_id(vol, adp, &st, dir->d_did, upath, strlen(upath));
778 ad_flush( adp);
782 ad_close( adp, ADFLAGS_DF|ADFLAGS_HF );
864 struct adouble ad, *adp;
890 adp = of_ad(vol, path, &ad);
1011 if ( ad_open_metadata( upath, 0, O_CREAT, adp) < 0) {
1024 } else if ((ad_get_HF_flags( adp ) & O_CREAT) ) {
1025 ad_setname(adp, path->m_name);
1038 ad_getattr(adp, &bshort);
1047 ad_setattr(adp, bshort);
1050 ad_setdate(adp, AD_DATE_CREATE, cdate);
1055 ad_setdate(adp, AD_DATE_BACKUP, bdate);
1058 if (default_type( ad_entry( adp, ADEID_FINDERI ))
1069 memcpy(ad_entry( adp, ADEID_FINDERI ), finder_buf, 32 );
1078 memcpy(ad_entry( adp, ADEID_FINDERI ), fdType, 4 );
1079 memcpy(ad_entry( adp, ADEID_FINDERI ) + 4, "pdos", 4 );
1097 ad_setdate(adp, AD_DATE_MODIFY, newdate);
1103 ad_flush( adp);
1104 ad_close_metadata( adp);
1129 * adp adouble struct of src file, if open, or & zeroed one
1132 int renamefile(const struct vol *vol, int sdir_fd, char *src, char *dst, char *newname, struct adouble *adp)
1153 if (adp->ad_open_forks) {
1193 if (!ad_open( dst, ADFLAGS_HF, O_RDWR, 0666, adp)) {
1194 ad_setname(adp, newname);
1195 ad_flush( adp );
1196 ad_close( adp, ADFLAGS_HF );
1283 struct adouble ad, *adp;
1319 adp = of_ad(s_vol, s_path, &ad);
1321 if (ad_open(s_path->u_name , ADFLAGS_DF |ADFLAGS_HF | ADFLAGS_NOHF, O_RDONLY, 0, adp) < 0) {
1324 denyreadset = (getforkmode(adp, ADEID_DFORK, AD_FILELOCK_DENY_RD) != 0 ||
1325 getforkmode(adp, ADEID_RFORK, AD_FILELOCK_DENY_RD) != 0 );
1382 if ( (err = copyfile(s_vol, d_vol, -1, p, upath , newname, adp)) < 0 ) {
1401 ad_close( adp, ADFLAGS_DF |ADFLAGS_HF );
1506 * currently if newname is NULL then adp is NULL.
1514 struct adouble *adp)
1526 if (adp == NULL) {
1528 adp = &ads;
1536 if (ad_openat(sfd, src, adflags | ADFLAGS_NOHF, O_RDONLY, 0, adp) < 0) {
1541 if (ad_meta_fileno(adp) == -1 && ad_reso_fileno(adp) == -1) { /* META / HF */
1546 stat_result = fstat(ad_data_fileno(adp), &st); /* saving stat exit code, thus saving us on one more stat later on */
1556 ad_close( adp, adflags );
1567 if (ad_reso_fileno(adp) == -1 || 0 == (err = copy_fork(ADEID_RFORK, &add, adp))){
1569 if ((err = copy_fork(ADEID_DFORK, &add, adp)) == 0) {
1580 ad_copy_header(&add, adp);
1584 ad_close( adp, adflags );
1634 static int check_attrib(struct adouble *adp)
1638 ad_getattr(adp, &bshort);
1656 struct adouble *adp = NULL;
1696 adp = &ad;
1699 if ( adp && ad_reso_fileno( adp ) != -1 ) { /* there's a resource fork */
1716 if (adp && ad_tmplock( &ad, ADEID_DFORK, ADLOCK_WR, 0, 0, 0 ) < 0) {
1729 if (adp)
1831 struct adouble ad, *adp;
1837 adp = of_ad(vol, &path, &ad);
1839 if ( ad_open_metadata( de->d_name, 0, 0, adp ) < 0 ) {
1842 if (ad_setid(adp, path.st.st_dev, path.st.st_ino, aint, did, vol->v_stamp)) {
1843 ad_flush(adp);
1845 ad_close_metadata(adp);
2091 static struct adouble *find_adouble(struct path *path, struct ofork **of, struct adouble *adp)
2120 adp = (*of)->of_ad;
2123 ret = ad_open( path->u_name, ADFLAGS_HF, O_RDONLY, 0, adp);
2125 if ( !ret && ad_reso_fileno(adp) != -1 && !(adp->ad_resource_fork.adf_flags & ( O_RDWR | O_WRONLY))) {
2129 ad_close(adp, ADFLAGS_HF);
2134 return adp;