- LOG(log_debug, logtype_default, "new_ad_header(\"%s\")", path);
+ LOG(log_debug, logtype_ad, "new_ad_header(\"%s\")", path);
- LOG(log_debug, logtype_default, "new_ad_header(\"%s\"): already initialized", path);
+ LOG(log_debug, logtype_ad, "new_ad_header(\"%s\"): already initialized", path);
- LOG(log_warning, logtype_default, "parse_entries: bogus eid: %d", eid);
+ LOG(log_warning, logtype_ad, "parse_entries: bogus eid: %d", eid);
ad->ad_version = ntohl( ad->ad_version );
if ((ad->ad_magic != AD_MAGIC) || (ad->ad_version != AD_VERSION2)) {
ad->ad_version = ntohl( ad->ad_version );
if ((ad->ad_magic != AD_MAGIC) || (ad->ad_version != AD_VERSION2)) {
if (!ad_getentryoff(ad, ADEID_RFORK)
|| (ad_getentryoff(ad, ADEID_RFORK) > sizeof(ad->ad_data))
) {
if (!ad_getentryoff(ad, ADEID_RFORK)
|| (ad_getentryoff(ad, ADEID_RFORK) > sizeof(ad->ad_data))
) {
- LOG(log_debug, logtype_afpd, "ad_valid_header_osx(\"%s\"): BEGIN", fullpathname(path));
+ LOG(log_debug, logtype_ad, "ad_valid_header_osx(\"%s\"): BEGIN", fullpathname(path));
adosx.ad_version = ntohl(adosx.ad_version);
if ((adosx.ad_magic != AD_MAGIC) || (adosx.ad_version != AD_VERSION2)) {
adosx.ad_version = ntohl(adosx.ad_version);
if ((adosx.ad_magic != AD_MAGIC) || (adosx.ad_version != AD_VERSION2)) {
- LOG(log_debug, logtype_afpd, "ad_valid_header_osx(\"%s\"): END: %d", fullpathname(path), ret);
+ LOG(log_debug, logtype_ad, "ad_valid_header_osx(\"%s\"): END: %d", fullpathname(path), ret);
adosx.ad_version = ntohl(adosx.ad_version);
if ((adosx.ad_magic != AD_MAGIC) || (adosx.ad_version != AD_VERSION2)) {
adosx.ad_version = ntohl(adosx.ad_version);
if ((adosx.ad_magic != AD_MAGIC) || (adosx.ad_version != AD_VERSION2)) {
|| ad_getentryoff(&adosx, ADEID_RFORK) > sizeof(ad->ad_data)
|| ad_getentryoff(&adosx, ADEID_RFORK) > header_len
) {
|| ad_getentryoff(&adosx, ADEID_RFORK) > sizeof(ad->ad_data)
|| ad_getentryoff(&adosx, ADEID_RFORK) > header_len
) {
else
header_len = sys_lgetxattr(path, AD_EA_META, ad->ad_data, AD_DATASZ_EA);
if (header_len < 1) {
else
header_len = sys_lgetxattr(path, AD_EA_META, ad->ad_data, AD_DATASZ_EA);
if (header_len < 1) {
- LOG(log_debug, logtype_default, "ad_header_read_ea: %s", strerror(errno));
+ LOG(log_debug, logtype_ad, "ad_header_read_ea: %s", strerror(errno));
ad->ad_version = ntohl( ad->ad_version );
if ((ad->ad_magic != AD_MAGIC) || (ad->ad_version != AD_VERSION2)) {
ad->ad_version = ntohl( ad->ad_version );
if ((ad->ad_magic != AD_MAGIC) || (ad->ad_version != AD_VERSION2)) {
if (len + AD_HEADER_LEN > sizeof(ad->ad_data))
len = sizeof(ad->ad_data) - AD_HEADER_LEN;
if (len > header_len - AD_HEADER_LEN) {
if (len + AD_HEADER_LEN > sizeof(ad->ad_data))
len = sizeof(ad->ad_data) - AD_HEADER_LEN;
if (len > header_len - AD_HEADER_LEN) {
"ad_open_df(\"%s\", %s): BEGIN [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags),
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
"ad_open_df(\"%s\", %s): BEGIN [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags),
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
"ad_open_df(\"%s\", %s): END: %d [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags), ret,
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
"ad_open_df(\"%s\", %s): END: %d [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags), ret,
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
"ad_open_hf_v2(\"%s\", %s): BEGIN [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags),
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
"ad_open_hf_v2(\"%s\", %s): BEGIN [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags),
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
ad_p = ad->ad_ops->ad_path(path, adflags);
oflags = O_NOFOLLOW | ad2openflags(ad, ADFLAGS_HF, adflags);
ad_p = ad->ad_ops->ad_path(path, adflags);
oflags = O_NOFOLLOW | ad2openflags(ad, ADFLAGS_HF, adflags);
- LOG(log_debug, logtype_default,"ad_open_hf_v2(\"%s\"): open flags: %s",
+ LOG(log_debug, logtype_ad,"ad_open_hf_v2(\"%s\"): open flags: %s",
fullpathname(path), openflags2logstr(oflags));
nocreatflags = oflags & ~(O_CREAT | O_EXCL);
fullpathname(path), openflags2logstr(oflags));
nocreatflags = oflags & ~(O_CREAT | O_EXCL);
- LOG(log_debug, logtype_default, "ad_open(\"%s\"): creating adouble file",
+ LOG(log_debug, logtype_ad, "ad_open(\"%s\"): creating adouble file",
"ad_open_hf_v2(\"%s\", %s): END: %d [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags), ret,
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
"ad_open_hf_v2(\"%s\", %s): END: %d [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags), ret,
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
"ad_open_hf_ea(\"%s\", %s): BEGIN [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags),
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
"ad_open_hf_ea(\"%s\", %s): BEGIN [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags),
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
- LOG(log_error, logtype_default, "ad_open_hf_ea(%s): rw request for ro file: %s",
+ LOG(log_error, logtype_ad, "ad_open_hf_ea(%s): rw request for ro file: %s",
if (adflags & ADFLAGS_DIR)
/* For directories we open the directory RDONYL so we can later fchdir() */
oflags = (oflags & ~O_RDWR) | O_RDONLY;
if (adflags & ADFLAGS_DIR)
/* For directories we open the directory RDONYL so we can later fchdir() */
oflags = (oflags & ~O_RDWR) | O_RDONLY;
- LOG(log_debug, logtype_default, "ad_open_hf_ea(\"%s\"): opening base file for meta adouble EA", path);
+ LOG(log_debug, logtype_ad, "ad_open_hf_ea(\"%s\"): opening base file for meta adouble EA", path);
EC_NEG1(ad_meta_fileno(ad) = open(path, oflags));
opened = 1;
ad->ad_mdp->adf_flags = oflags;
EC_NEG1(ad_meta_fileno(ad) = open(path, oflags));
opened = 1;
ad->ad_mdp->adf_flags = oflags;
/* Read the adouble header in and parse it.*/
if (ad->ad_ops->ad_header_read(path, ad, NULL) != 0) {
if (!(adflags & ADFLAGS_CREATE)) {
/* Read the adouble header in and parse it.*/
if (ad->ad_ops->ad_header_read(path, ad, NULL) != 0) {
if (!(adflags & ADFLAGS_CREATE)) {
- LOG(log_debug, logtype_default, "ad_open_hf_ea(\"%s\"): can't read metadata EA", path);
+ LOG(log_debug, logtype_ad, "ad_open_hf_ea(\"%s\"): can't read metadata EA", path);
- LOG(log_debug, logtype_default, "ad_open_hf_ea(\"%s\"): creating metadata EA", path);
+ LOG(log_debug, logtype_ad, "ad_open_hf_ea(\"%s\"): creating metadata EA", path);
/* It doesnt exist, EPERM or another error */
if (!(errno == ENOATTR || errno == ENOENT)) {
/* It doesnt exist, EPERM or another error */
if (!(errno == ENOATTR || errno == ENOENT)) {
- LOG(log_error, logtype_default, "ad_open_hf_ea: unexpected: %s", strerror(errno));
+ LOG(log_error, logtype_ad, "ad_open_hf_ea: unexpected: %s", strerror(errno));
EC_NEG1_LOG(new_ad_header(ad, path, NULL, adflags));
ad->ad_mdp->adf_flags |= O_CREAT; /* mark as just created */
ad_flush(ad);
EC_NEG1_LOG(new_ad_header(ad, path, NULL, adflags));
ad->ad_mdp->adf_flags |= O_CREAT; /* mark as just created */
ad_flush(ad);
- LOG(log_debug, logtype_default, "ad_open_hf_ea(\"%s\"): created metadata EA", path);
+ LOG(log_debug, logtype_ad, "ad_open_hf_ea(\"%s\"): created metadata EA", path);
"ad_open_hf_ea(\"%s\", %s): END: %d [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags), ret,
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
"ad_open_hf_ea(\"%s\", %s): END: %d [dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags), ret,
ad_data_fileno(ad), ad->ad_data_fork.adf_refcount,
- LOG(log_debug, logtype_default, "ad_reso_size(\"%s\"): BEGIN", path);
+ LOG(log_debug, logtype_ad, "ad_reso_size(\"%s\"): BEGIN", path);
- LOG(log_debug, logtype_default, "ad_reso_size(\"%s\"): size: %zd", path, ad->ad_rlen);
+ LOG(log_debug, logtype_ad, "ad_reso_size(\"%s\"): size: %zd", path, ad->ad_rlen);
- LOG(log_debug, logtype_default, "ad_open_rf(\"%s\"): BEGIN", fullpathname(path));
+ LOG(log_debug, logtype_ad, "ad_open_rf(\"%s\"): BEGIN", fullpathname(path));
- LOG(log_debug, logtype_default, "ad_open_rf(\"%s\"): created adouble rfork: \"%s\"",
+ LOG(log_debug, logtype_ad, "ad_open_rf(\"%s\"): created adouble rfork: \"%s\"",
EC_ZERO_LOG( fstat(ad_reso_fileno(ad), &st) );
if (ad->ad_rfp->adf_flags & O_CREAT) {
/* This is a new adouble header file, create it */
EC_ZERO_LOG( fstat(ad_reso_fileno(ad), &st) );
if (ad->ad_rfp->adf_flags & O_CREAT) {
/* This is a new adouble header file, create it */
- LOG(log_debug, logtype_default, "ad_open_rf(\"%s\"): created adouble rfork, initializing: \"%s\"",
+ LOG(log_debug, logtype_ad, "ad_open_rf(\"%s\"): created adouble rfork, initializing: \"%s\"",
path, rfpath);
EC_NEG1_LOG( new_ad_header(ad, path, NULL, adflags) );
path, rfpath);
EC_NEG1_LOG( new_ad_header(ad, path, NULL, adflags) );
- LOG(log_debug, logtype_default, "ad_open_rf(\"%s\"): created adouble rfork, flushing: \"%s\"",
+ LOG(log_debug, logtype_ad, "ad_open_rf(\"%s\"): created adouble rfork, flushing: \"%s\"",
- LOG(log_debug, logtype_default, "ad_open_rf(\"%s\"): reading adouble rfork: \"%s\"",
+ LOG(log_debug, logtype_ad, "ad_open_rf(\"%s\"): reading adouble rfork: \"%s\"",
- LOG(log_debug, logtype_default, "ad_open_rf(\"%s\"): END: %d", fullpathname(path), ret);
+ LOG(log_debug, logtype_ad, "ad_open_rf(\"%s\"): END: %d", fullpathname(path), ret);
- LOG(log_debug, logtype_default, "ad_mkdir(\"%s\", %04o) {cwd: \"%s\"}",
+ LOG(log_debug, logtype_ad, "ad_mkdir(\"%s\", %04o) {cwd: \"%s\"}",
path, mode, getcwdpath());
st_invalid = ad_mode_st(path, &mode, &stbuf);
path, mode, getcwdpath());
st_invalid = ad_mode_st(path, &mode, &stbuf);
"ad_open(\"%s\", %s): BEGIN {d: %d, m: %d, r: %d}"
"[dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags),
"ad_open(\"%s\", %s): BEGIN {d: %d, m: %d, r: %d}"
"[dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), adflags2logstr(adflags),
"ad_open(\"%s\"): END: %d {d: %d, m: %d, r: %d}"
"[dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), ret,
"ad_open(\"%s\"): END: %d {d: %d, m: %d, r: %d}"
"[dfd: %d (ref: %d), mfd: %d (ref: %d), rfd: %d (ref: %d)]",
fullpathname(path), ret,
- LOG(log_error, logtype_afpd, "ad_openat: cant chdir back, exiting");
+ LOG(log_error, logtype_ad, "ad_openat: cant chdir back, exiting");