EC_INIT;
struct stat st;
ssize_t cc;
- size_t roundup;
off_t r_off;
if (ad_data_fileno(ad) == AD_SYMLINK) {
return -1; /* we don't know how to write if it's not a ressource or data fork */
}
-EC_CLEANUP:
if (ret != 0)
return ret;
return( cc );
}
/* ------------------------ */
-int ad_rtruncate( struct adouble *ad, const off_t size)
+int ad_rtruncate(struct adouble *ad, const char *uname, const off_t size)
{
EC_INIT;
#ifndef HAVE_EAFD
if (ad->ad_vers == AD_VERSION_EA && size == 0)
- EC_NEG1( unlink(ad->ad_ops->ad_path(ad->ad_name, 0)) );
+ EC_NEG1( unlink(ad->ad_ops->ad_path(uname, 0)) );
else
#endif
EC_NEG1( sys_ftruncate(ad_reso_fileno(ad), size + ad->ad_eid[ ADEID_RFORK ].ade_off) );
ad->ad_rlen = size;
else
LOG(log_error, logtype_ad, "ad_rtruncate(\"%s\"): %s",
- fullpathname(ad->ad_name), strerror(errno));
+ fullpathname(uname), strerror(errno));
EC_EXIT;
}