RFR: 8229872: (fs) Increase buffer size used with getmntent
Alan Bateman
Alan.Bateman at oracle.com
Fri Aug 23 14:58:57 UTC 2019
On 23/08/2019 15:41, Vladimir Kempik wrote:
> Hello
>
> please review v3 version of patch
>
> http://cr.openjdk.java.net/~vkempik/8229872/webrev.03/
>
> no locks required now
> getline is used in reduced form, to only return linelen, nice comment
> about that in code included:
I think the approach is reasonable but a few things need to be moved
around to be consistent with the other code in this area.
Can you move rewind to UnixNativeDispatcher so that it's with the other
FILE* functions? I'm pretty sure you have to set errno to 0 before
calling it and it will set it if there is an error.
I think UnixNativeDispatcher should also define getline to wrap the libc
function rather that getlinelen.
I think we should change getmnent to take both a buffer and buffer
length. If you look at the other wrapper methods you'll see how they use
NativeBuffer to avoid the malloc in native code.
-Alan
More information about the nio-dev
mailing list