RFR: 8229872: (fs) Increase buffer size used with getmntent

Vladimir Kempik vkempik at azul.com
Wed Sep 4 15:35:45 UTC 2019


Hello
Please review v6 of the patch http://cr.openjdk.java.net/~vkempik/8229872/webrev.06/ <http://cr.openjdk.java.net/~vkempik/8229872/webrev.06/>
diff vs v5:
- setting errno = 0 before calling rewind and reading errno in case of error
- getmntent_r now checks for malloc result and frees that buffer only when it becomes unneeded.

Thanks, Vladimir
> 4 сент. 2019 г., в 18:04, Florian Weimer <fweimer at redhat.com> написал(а):
> 
> * Alan Bateman:
> 
>> Have you considered using fseek instead of rewind to avoid the
>> uncertainty as to whether errno is set?
> 
> POSIX requires that rewind sets errno on failure, so I'm not sure if
> this is necessary.  At least with rewind, you don't have to worry if you
> need to call fseek or fseeko or fseeko64.
> 
> Thanks,
> Florian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190904/100cb450/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190904/100cb450/signature.asc>


More information about the nio-dev mailing list