]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/vfs/ea_sys.c
Merge master
[netatalk.git] / libatalk / vfs / ea_sys.c
index 014a7482905e810ec2b19b7b0716a12bcc0e5d87..5b210d81de9042d9227bbd793d7dce0de9e07eb1 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <dirent.h>
+#include <arpa/inet.h>
 
 #include <atalk/adouble.h>
 #include <atalk/ea.h>
@@ -308,15 +309,20 @@ int sys_set_ea(VFS_FUNC_ARGS_EA_SET)
         switch(errno) {
         case OPEN_NOFOLLOW_ERRNO:
             /* its a symlink and client requested O_NOFOLLOW  */
-            LOG(log_debug, logtype_afpd, "sys_set_ea(%s/%s): encountered symlink with kXAttrNoFollow",
-                uname, attruname);
+            LOG(log_debug, logtype_afpd, "sys_set_ea(\"%s/%s\", ea:'%s'): encountered symlink with kXAttrNoFollow",
+                getcwdpath(), uname, attruname);
             return AFP_OK;
         case EEXIST:
-            LOG(log_debug, logtype_afpd, "sys_set_ea(%s/%s): EA already exists",
-                uname, attruname);
+            LOG(log_debug, logtype_afpd, "sys_set_ea(\"%s/%s\", ea:'%s'): EA already exists",
+                getcwdpath(), uname, attruname);
             return AFPERR_EXIST;
         default:
-            LOG(log_error, logtype_afpd, "sys_set_ea(%s/%s): error: %s", uname, attruname, strerror(errno));
+            LOG(log_error, logtype_afpd, "sys_set_ea(\"%s/%s\", ea:'%s', size: %u, flags: %s|%s|%s): %s",
+                getcwdpath(), uname, attruname, attrsize, 
+                oflag & O_CREAT ? "XATTR_CREATE" : "-",
+                oflag & O_TRUNC ? "XATTR_REPLACE" : "-",
+                oflag & O_NOFOLLOW ? "O_NOFOLLOW" : "-",
+                strerror(errno));
             return AFPERR_MISC;
         }
     }