Add some comments

This commit is contained in:
Gregory Nutt 2014-11-29 10:59:41 -06:00
parent b0c20df791
commit 1a22ede31c
2 changed files with 10 additions and 2 deletions

View File

@ -74,6 +74,10 @@ config LIBC_IOCTL_VARIADIC
compatibility if you are porting code from other platforms that use
the variadic ioctl() function.
WARNING: Use of this option could cause subtle system errors is
the third argument is omitted or if the sizeof the thread argument
is anything other than sizeof (unsigned long).
config LIB_RAND_ORDER
int "Order of the random number generate"
default 1

View File

@ -87,7 +87,11 @@ int ioctl(int fd, int req, ...)
va_list ap;
unsigned long arg;
/* Get the unsigned long argument */
/* Get the unsigned long argument.
*
* REVISIT: This could cause of the crash down the road if the actual size
* of the argument is anything other than sizeof(unsigned long);
*/
va_start(ap, req);
arg = va_arg(ap, unsigned long);