commit | 385c6f4303341beb9b091b6d252811b7ca3b9f42 | [log] [tgz] |
---|---|---|
author | Nick Kralevich <nnk@google.com> | Thu Dec 20 12:17:24 2012 -0800 |
committer | Nick Kralevich <nnk@google.com> | Thu Dec 20 13:50:44 2012 -0800 |
tree | b7551026b97cb6a4d00980940b2f0763023e81dd | |
parent | e60dbb8a86df42576659c0be0591a2f072074bc8 [diff] |
FileChannelImpl: Ignore ftruncate failures on non-regular files Truncate only works on regular files. On other files, such as UNIX character devices, truncate returns EINVAL, which causes an IOException to be thrown. With this change, we now have support for creating a MappedByteBuffer on UNIX character devices such as /dev/zero, if the underlying device node supports mmap(). Change-Id: I094371d821b187abe3da32edc411ff76a81b047e