On 10/31/2015 05:37 PM, Vladimir Sementsov-Ogievskiy wrote:
On 31.10.2015 10:26, Xiao Guangrong wrote:
On 10/30/2015 09:26 PM, Vladimir Sementsov-Ogievskiy wrote:
logic is changed:
in old version gethugepagesize on statfs error generates exit(1)
in new it returns getpagesize() in this case (through fd_getpagesize)
(I think, fd_getpagesize should be fixed to handle error)
Indeed. I will let fd_getpagesize() return 0 if statfs is failed, then the caller
handle the error properly.
Why not use classic error codes < 0? Just change size_t to ssize_t and return exactly fstatfs return
value.
Yup, it's better, however, i am planning to introduce a Error parameter and error
condition can be checked by if Error is NULL as Eduardo suggested.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html