src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java
Print this page
rev 9260 : [mq]: io-events-path
*** 147,157 ****
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");
--- 147,157 ----
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");
*** 188,198 ****
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()) {
--- 188,198 ----
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()) {