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

Vladimir Kempik vkempik at azul.com
Fri Sep 6 15:12:47 UTC 2019


Hello
such custing (from long to int) were needed only because getmntent_r expects last argument to be int

https://linux.die.net/man/3/getmntent_r
struct mntent *getmntent_r(FILE *fp, struct mntent *mntbuf, char *buf, int buflen);

so could you please clarify ?
since getlinelen returns long, I see no issue so far.

Thanks, Vladimir

6 сент. 2019 г., в 18:03, Florian Weimer <fweimer at redhat.com<mailto:fweimer at redhat.com>> написал(а):

* Vladimir Kempik:

Hello

Thanks for comments

updated webrev including all mentioned things.

http://cr.openjdk.java.net/~vkempik/8229872/webrev.08/

In src/java.base/linux/native/libnio/fs/LinuxNativeDispatcher.c:

+    int buflen = (int)bufLen;

The buffer size should be size_t, for consistency with the possible
return values of Java_sun_nio_fs_UnixNativeDispatcher_getlinelen.

Thanks,
Florian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190906/a7f7f996/attachment.html>


More information about the nio-dev mailing list