]> arthur.barton.de Git - netatalk.git/commitdiff
Fixes and disable ad_tmplock
authorFrank Lahm <franklahm@googlemail.com>
Tue, 24 Jan 2012 09:54:46 +0000 (10:54 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Tue, 24 Jan 2012 09:54:46 +0000 (10:54 +0100)
libatalk/adouble/ad_lock.c
libatalk/adouble/ad_open.c

index b616fdba697db46b8d7a422024b8db2083a72308..113c85534b31595b97ad795e84312743a17cacd1 100644 (file)
@@ -613,6 +613,9 @@ int ad_tmplock(struct adouble *ad, const uint32_t eid, const int locktype,
     int err;
     int type;  
 
+    if (ad->ad_vers == AD_VERSION_EA)
+        return 0;
+
     lock.l_start = off;
     type = locktype;
     if (eid == ADEID_DFORK) {
index bafade2a6d939f02273ae1d1fe9c0559b096a5d7..c6ee96ecfdd89c247eb05dc2b84dcbd18993df76 100644 (file)
@@ -1044,7 +1044,7 @@ static int ad_reso_size(const char *path, int adflags, struct adouble *ad)
     int opened = 0;
     int eafd = ad_reso_fileno(ad);
     if (eafd == -1) {
-        EC_NEG1( eafd = sys_getxattrfd(path, O_RDONLY) );
+        EC_NEG1( eafd = sys_getxattrfd(path, AD_EA_RESO, O_RDONLY) );
         opened = 1;
     }
     EC_NEG1( rlen = fstat(eafd, &st) );