]> arthur.barton.de Git - netatalk.git/commitdiff
ad_v1tov2 was using a wrong offset for resource fork.
authordidg <didg>
Tue, 25 Nov 2003 05:05:43 +0000 (05:05 +0000)
committerdidg <didg>
Tue, 25 Nov 2003 05:05:43 +0000 (05:05 +0000)
include/atalk/adouble.h
libatalk/adouble/ad_open.c

index e87e086f42eb47681ac312e2a2b9b9e4b691b0f7..5bf88f889f0ca15d5b431326013f4e5e862a1f01 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: adouble.h,v 1.21.6.2 2003-10-17 00:01:12 didg Exp $
+ * $Id: adouble.h,v 1.21.6.3 2003-11-25 05:05:43 didg Exp $
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
@@ -156,7 +156,17 @@ ADEID_NUM_V1*AD_ENTRY_LEN)
 +ADEDLEN_PRIVDEV +ADEDLEN_PRIVINO +ADEDLEN_PRIVSYN)
 
 /* 725 */
+/*
 #define AD_DATASZ2      (AD_DATASZ1 + (ADEID_NUM_V2 -ADEID_NUM_V1)*AD_ENTRY_LEN)
+FIXME I give up,
+for our adouble version 2 size *is* 725 
+*/
+#define AD_DATASZ2 725
+
+#if AD_DATASZ2 != 725
+#error bad size for AD_DATASZ2
+#endif
+
 #define AD_DATASZ_MAX   1024
 #if AD_VERSION == AD_VERSION1
 #define AD_DATASZ      AD_DATASZ1 /* hold enough for the entries */
@@ -411,7 +421,7 @@ extern int ad_getattr __P((const struct adouble *, u_int16_t *));
 #if AD_VERSION == AD_VERSION2
 extern int ad_setid __P((struct adouble *, const struct stat *, const u_int32_t, const void *));
 #else
-#define ad_setid(a, b, c)
+#define ad_setid(a, b, c, d)
 #endif
 
 #ifdef WITH_SENDFILE
index 5b236551acc24ffc6b5aacb079302c03274772ba..ecbdfd3f9d67cda4a9a5d2dd51d7b9e94d65e1bc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_open.c,v 1.30.6.2 2003-10-17 00:01:12 didg Exp $
+ * $Id: ad_open.c,v 1.30.6.3 2003-11-25 05:05:43 didg Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -230,10 +230,8 @@ static int ad_v1tov2(struct adouble *ad, const char *path)
    *  2) create space for SHORTNAME, AFPFILEI, DID, and PRODOSI
    *  3) move FILEI attributes into AFPFILEI
    *  4) initialize ACCESS field of FILEDATESI.
-   *
-   *  so, we need 4*12 (entry ids) + 12 (shortname) + 4 (afpfilei) +
-   *  4 (did) + 8 (prodosi) = 76 more bytes.  */
-  
+   */
+   
 #define SHIFTDATA (AD_DATASZ2 - AD_DATASZ1)
 
   /* bail if we can't get a lock */