mirror of
https://github.com/apache/nuttx.git
synced 2025-12-16 01:34:58 +08:00
Kernel module should prefer functions with nx/kmm prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alin Jerpelea
parent
15480e51cf
commit
0536953ded
@@ -107,13 +107,12 @@ static int builtin_loadbinary(struct binary_s *binp)
|
||||
* the file using the FIOC_FILENAME ioctl() call.
|
||||
*/
|
||||
|
||||
ret = ioctl(fd, FIOC_FILENAME, (unsigned long)((uintptr_t)&filename));
|
||||
ret = nx_ioctl(fd, FIOC_FILENAME, (unsigned long)((uintptr_t)&filename));
|
||||
if (ret < 0)
|
||||
{
|
||||
int errval = get_errno();
|
||||
berr("ERROR: FIOC_FILENAME ioctl failed: %d\n", errval);
|
||||
close(fd);
|
||||
return -errval;
|
||||
berr("ERROR: FIOC_FILENAME ioctl failed: %d\n", ret);
|
||||
nx_close(fd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Other file systems may also support FIOC_FILENAME, so the real proof
|
||||
@@ -124,7 +123,7 @@ static int builtin_loadbinary(struct binary_s *binp)
|
||||
if (index < 0)
|
||||
{
|
||||
berr("ERROR: %s is not a builtin application\n", filename);
|
||||
close(fd);
|
||||
nx_close(fd);
|
||||
return index;
|
||||
}
|
||||
|
||||
@@ -136,7 +135,7 @@ static int builtin_loadbinary(struct binary_s *binp)
|
||||
binp->entrypt = builtin->main;
|
||||
binp->stacksize = builtin->stacksize;
|
||||
binp->priority = builtin->priority;
|
||||
close(fd);
|
||||
nx_close(fd);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user