You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/09 17:24:22 UTC

[GitHub] [incubator-nuttx] anchao commented on pull request #2488: libs/libc: correct the getrandom(2) prototype

anchao commented on pull request #2488:
URL: https://github.com/apache/incubator-nuttx/pull/2488#issuecomment-741921106


   Hi @juniskane 
   
   I don't understand what we're arguing about, Whatever the name you like to call it getentropy,arc4random_ buf, it's up to you.
   but could you please bring the naming getrandom() back to POSIX ? 
   
   Seriously, no one cares about your implementation,I only care about whether the definition of user interface can be easily accepted by everyone. 
   Application developers only need to check the man page from POSIX !!!
   
   https://www.unix.com/man-page/posix/2/getrandom/
   
   You prefer to define user interfaces in reliable, secure and easier to use, this is very commendable, the goal is consistent with us,
   but the prototypes is a legacy of history, if we don't fix it soon, more developers will question it in the future,
   
   Q:"why the getrandom(2) does not strictly follow the POSIX compliance ?"
   Juniskane: "Interfaces that have two parameters are easier to use than ones with three. Interfaces that cannot ever fail are more reliable...."
   
   Q:"why the getrandom(2) does not strictly follow the POSIX compliance? NuttX should be Strict POSIX compliance!"
   Juniskane: "Oh, Dear developer, Interfaces that have two parameters are easier to use than ones with three. Interfaces that cannot ever fail are more reliable...."
   
   What should we do like this "tomorrow"?
   
   I think the best solution is to accept the legacy, accept the history, there is no absolute correctness or wrongness. 
   this is just because different people may view the same thing from different perspectives, 
   A standard interface will make it easier for application developers to feel the perfection of NuttX,  
   what an amazing thing to let a FreeBSD or Linux application run in NuttX without any changes, 
   
   I don't quite understand what will affect you if change to a compliance prototype? 
   getranom() is not in your openBSD page,  Could you please change the name back to arc4random_buf(), thank you very much !!


----------------------------------------------------------------
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:
users@infra.apache.org