]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/vfs/sys_ea.c
Return right error for requested but non-existing EA.
[netatalk.git] / libatalk / vfs / sys_ea.c
index 88b9e645762f0526f11c7107c1330c76cb75bbfa..44037a15f11a1e7ea6925c568a4b8b4be94b33ac 100644 (file)
@@ -25,7 +25,7 @@
    Copyright (C) 2001 Andreas Gruenbacher.
       
    Samba 3.0.28, modified for netatalk.
-   $Id: sys_ea.c,v 1.5 2009-11-23 19:04:15 franklahm Exp $
+   $Id: sys_ea.c,v 1.6 2009-12-04 10:26:10 franklahm Exp $
    
 */
 
 #include <atalk/logger.h>
 #include <atalk/ea.h>
 
+#ifndef ENOATTR
+#define ENOATTR ENODATA
+#endif
+
 /******** Solaris EA helper function prototypes ********/
 #ifdef HAVE_ATTROPEN
 #define SOLARIS_ATTRMODE S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP
@@ -755,6 +759,7 @@ static int solaris_attropen(const char *path, const char *attrpath, int oflag, m
        int filedes = attropen(path, attrpath, oflag, mode);
        if (filedes == -1) {
                LOG(log_maxdebug, logtype_default, "attropen FAILED: path: %s, name: %s, errno: %s\n",path,attrpath,strerror(errno));
+        errno = ENOATTR;
        }
        return filedes;
 }