/* get_id needs adp for reading CNID from adouble file */
ad_init(&ad, vol->v_adouble, vol->v_ad_options);
- if ((ad_open_metadata(path->u_name, ADFLAGS_DIR, 0, &ad)) == 0) /* 1 */
+ if ((ad_open(&ad, path->u_name, ADFLAGS_HF | ADFLAGS_DIR)) == 0) /* 1 */
adp = &ad;
/* Get CNID */
(1 << DIRPBIT_FINFO)))) {
ad_init(&ad, vol->v_adouble, vol->v_ad_options);
- if ( !ad_metadata( upath, ADFLAGS_CREATE|ADFLAGS_DIR, &ad) ) {
+ if ( !ad_metadata( upath, ADFLAGS_DIR, &ad) )
isad = 1;
if (ad.ad_md->adf_flags & O_CREAT) {
/* We just created it */
}
ad_init(&ad, vol->v_adouble, vol->v_ad_options);
- if (ad_open_metadata( upath, ADFLAGS_DIR, O_CREAT, &ad) < 0) {
+ if (ad_open(&ad, upath, ADFLAGS_HF | ADFLAGS_DIR, O_CREAT, 0777) != 0) {
/*
* Check to see what we're trying to set. If it's anything
* but ACCESS, UID, or GID, give an error. If it's any of those
* Check to see if a create was necessary. If it was, we'll want
* to set our name, etc.
*/
- if ( (ad_get_HF_flags( &ad ) & O_CREAT)) {
+ if ( (ad_get_MD_flags( &ad ) & O_CREAT)) {
ad_setname(&ad, cfrombstr(curdir->d_m_name));
}
}
}
ad_init(&ad, vol->v_adouble, vol->v_ad_options);
- if (ad_open_metadata( ".", ADFLAGS_DIR, O_CREAT, &ad ) < 0) {
+ if (ad_open(&ad, ".", ADFLAGS_HF | ADFLAGS_DIR, O_CREAT, 0777) < 0) {
if (vol_noadouble(vol))
goto createdir_done;
return( AFPERR_ACCESS );
ad_init(&ad, vol->v_adouble, vol->v_ad_options);
- if (!ad_open_metadata( dst, ADFLAGS_DIR, 0, &ad)) {
+ if (ad_open(&ad, dst, ADFLAGS_HF | ADFLAGS_DIR) == 0) {
ad_setname(&ad, newname);
ad_flush( &ad);
ad_close_metadata( &ad);