juniskane commented on pull request #2488: URL: https://github.com/apache/incubator-nuttx/pull/2488#issuecomment-739961321
> getrandom has the same prototype in both FreeBSD and Linux: > https://www.freebsd.org/cgi/man.cgi?query=getrandom&sektion=2&manpath=freebsd-release-ports > https://man7.org/linux/man-pages/man2/getrandom.2.html > I don't think that there is any reason why we don't follow them. NuttX getrandom() interface is modeled after OpenBSD's getentropy() and arc4random_buf(): https://man.openbsd.org/getentropy https://man.openbsd.org/arc4random.3 It was originally called speckrandom_buf() but was changed later to getrandom() by my colleague when the underlying cipher was changed to BLAKE2Xs. Today, I would create it as nx_getrandom() to be clear that it is a NuttX interface (but I don't propose this change/rename now, after several years of use). Linux is not the pinnacle of OS development. I'm opposed to idea that new operating systems mindlessly imitate Linux even when things can be improved with little effort. Linux people have the idea that no user-space callers every have to change due to kernel changes, so they are stuck with bad interfaces forever. That is a good rule for OS with huge installed space, but not for us. Interfaces that have two parameters are easier to use than ones with three. Interfaces that cannot ever fail are more reliable, secure and easier to use than ones that can. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org