src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java

Print this page
rev 6052 : [mq]: jdk.patch

*** 145,155 **** try { // open attribute file int afd = openat(fd, nameAsBytes(file,name), (O_RDONLY|O_XATTR), 0); // wrap with channel ! FileChannel fc = UnixChannelFactory.newFileChannel(afd, true, false); // read to EOF (nothing we can do if I/O error occurs) try { if (fc.size() > dst.remaining()) throw new IOException("Extended attribute file too large"); --- 145,155 ---- try { // open attribute file int afd = openat(fd, nameAsBytes(file,name), (O_RDONLY|O_XATTR), 0); // wrap with channel ! FileChannel fc = UnixChannelFactory.newFileChannel(afd, file.toString(), true, false); // read to EOF (nothing we can do if I/O error occurs) try { if (fc.size() > dst.remaining()) throw new IOException("Extended attribute file too large");
*** 186,196 **** int afd = openat(fd, nameAsBytes(file,name), (O_CREAT|O_WRONLY|O_TRUNC|O_XATTR), UnixFileModeAttribute.ALL_PERMISSIONS); // wrap with channel ! FileChannel fc = UnixChannelFactory.newFileChannel(afd, false, true); // write value (nothing we can do if I/O error occurs) try { int rem = src.remaining(); while (src.hasRemaining()) { --- 186,196 ---- int afd = openat(fd, nameAsBytes(file,name), (O_CREAT|O_WRONLY|O_TRUNC|O_XATTR), UnixFileModeAttribute.ALL_PERMISSIONS); // wrap with channel ! FileChannel fc = UnixChannelFactory.newFileChannel(afd, file.toString(), false, true); // write value (nothing we can do if I/O error occurs) try { int rem = src.remaining(); while (src.hasRemaining()) {