Allow Solaris sys_llistxattr() to return the list length when size == 0.
authorWayne Davison <wayned@samba.org>
Sat, 15 Aug 2009 13:40:12 +0000 (06:40 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 15 Aug 2009 13:43:06 +0000 (06:43 -0700)
lib/sysxattrs.c

index 7845d59..1512518 100644 (file)
@@ -254,6 +254,8 @@ ssize_t sys_llistxattr(const char *path, char *list, size_t size)
                        continue;
 
                if ((ret += len+1) > size) {
+                       if (size == 0)
+                               continue;
                        ret = -1;
                        errno = ERANGE;
                        break;