jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
changeset 21290 db5e0cad1102
parent 14011 3d24d5dcf602
child 23010 6dadb192ad81
equal deleted inserted replaced
21289:95fcae9543b4 21290:db5e0cad1102
    96     private boolean isExtendedAttributesEnabled(UnixPath path) {
    96     private boolean isExtendedAttributesEnabled(UnixPath path) {
    97         try {
    97         try {
    98             int fd = path.openForAttributeAccess(false);
    98             int fd = path.openForAttributeAccess(false);
    99             try {
    99             try {
   100                 // fgetxattr returns size if called with size==0
   100                 // fgetxattr returns size if called with size==0
   101                 LinuxNativeDispatcher.fgetxattr(fd, "user.java".getBytes(), 0L, 0);
   101                 byte[] name = Util.toBytes("user.java");
       
   102                 LinuxNativeDispatcher.fgetxattr(fd, name, 0L, 0);
   102                 return true;
   103                 return true;
   103             } catch (UnixException e) {
   104             } catch (UnixException e) {
   104                 // attribute does not exist
   105                 // attribute does not exist
   105                 if (e.errno() == UnixConstants.ENODATA)
   106                 if (e.errno() == UnixConstants.ENODATA)
   106                     return true;
   107                     return true;