]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/adouble/ad_open.c
Add conversion option to dbd
[netatalk.git] / libatalk / adouble / ad_open.c
index adbdbe1ebe35e5673cf90ae87bf49b09f0d65b3d..c6aa776da7244bf83de2b8749450f0b499aa606a 100644 (file)
@@ -444,7 +444,7 @@ static int ad_header_read(const char *path _U_, struct adouble *ad, const struct
     struct stat         st;
 
     /* read the header */
-    if ((header_len = adf_pread( ad->ad_mdp, buf, AD_DATASZ, 0)) < 0) {
+    if ((header_len = adf_pread( ad->ad_mdp, buf, AD_DATASZ2, 0)) < 0) {
         return -1;
     }
     if (header_len < AD_HEADER_LEN) {
@@ -806,6 +806,7 @@ static int ad_conv_v22ea_hf(const char *path, const struct stat *sp, const struc
 EC_CLEANUP:
     EC_ZERO_LOG( ad_close(&adv2, ADFLAGS_HF | ADFLAGS_SETSHRMD) );
     EC_ZERO_LOG( ad_close(&adea, ADFLAGS_HF | ADFLAGS_SETSHRMD) );
+    LOG(log_debug, logtype_default,"ad_conv_v22ea_hf(\"%s\"): END: %d", fullpathname(path), ret);
     EC_EXIT;
 }
 
@@ -839,6 +840,7 @@ static int ad_conv_v22ea_rf(const char *path, const struct stat *sp, const struc
 EC_CLEANUP:
     EC_ZERO_LOG( ad_close(&adv2, ADFLAGS_HF | ADFLAGS_RF) );
     EC_ZERO_LOG( ad_close(&adea, ADFLAGS_HF | ADFLAGS_RF) );
+    LOG(log_debug, logtype_default,"ad_conv_v22ea_rf(\"%s\"): END: %d", fullpathname(path), ret);
     EC_EXIT;
 }
 
@@ -1862,6 +1864,8 @@ int ad_convert(const char *path, const struct stat *sp, const struct vol *vol)
     const char *adpath;
     int adflags = S_ISDIR(sp->st_mode) ? ADFLAGS_DIR : 0;
 
+    LOG(log_debug, logtype_default,"ad_convert(\"%s\"): BEGIN", fullpathname(path));
+
     if (!(vol->v_adouble == AD_VERSION_EA) || (vol->v_flags & AFPVOL_NOV2TOEACONV))
         goto EC_CLEANUP;
 
@@ -1877,6 +1881,7 @@ int ad_convert(const char *path, const struct stat *sp, const struct vol *vol)
     unbecome_root();
 
 EC_CLEANUP:
+    LOG(log_debug, logtype_default,"ad_convert(\"%s\"): END: %d", fullpathname(path), ret);
     EC_EXIT;
 }