Add missing FAR and CODE to pointers
Remove FAR for non-pointer variables
Remove extra spaces and align the parameters
Add do {} while(0) wrapper in macro
Use nitems to calculate number of elements in arrays
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
The following error was reported when runing usrsocktest with KASAN check enabled.
==1348590==ERROR: AddressSanitizer: stack-buffer-overflow on address 0xf20ec610 at pc 0x56ac61ba bp 0xf20ec278 sp 0xf20ec268
rootcause:
hdrbuf's size is not large enough to store the data in usrsock's request.
solution:
double herbuf's size to make sure the space, used to store usrsock's request, is enough.
Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
fix usrsock remote_disconnect fail:
nsh> usrsocktest
...
Testing group "remote_disconnect" =>
[TEST ASSERT FAILED!]
In function "receive":
line 497: Assertion `(ssize_t)((ret)) == (ssize_t)((0))' failed.
got value: -1
should be: 0
Group "remote_disconnect": [FAILED]
...
Reference:
RECV(2)
NAME
recv, recvfrom, recvmsg - receive a message from a socket
...
RETURN VALUE
...
When a stream socket peer has performed an orderly shutdown,
the return value will be 0 (the traditional "end-of-file" return).
Datagram sockets in various domains (e.g., the UNIX and Internet domains)
permit zero-length datagrams. When such a datagram is received, the return value is 0.
Signed-off-by: chao an <anchao@xiaomi.com>
The test model of usrsock ioctl() has changed after file socket layer implemented from vfs,
usrsock must implement the ioctl() hook to pass this test
Signed-off-by: chao an <anchao@xiaomi.com>
usrsocktest_wake_with_signal.c: In function ‘do_wake_test’:
usrsocktest_wake_with_signal.c:553:16: error: ‘USEC_PER_MSEC’ undeclared (first use in this function)
553 | usleep(100 * USEC_PER_MSEC); /* Let worker thread proceed to blocking
| ^~~~~~~~~~~~~
Signed-off-by: chao an <anchao@xiaomi.com>
DUP(2) Linux Programmer's Manual
NAME
dup, dup2, dup3 - duplicate a file descriptor
...
RETURN VALUE
On success, these system calls return the new file descriptor.
On error, -1 is returned, and errno is set appropriately.
Signed-off-by: chao an <anchao@xiaomi.com>
Gregory Nutt has submitted the SGA
Haltian Ltd has submitted the SGA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Adapt to the change in the main repo.
mallinfo is meant to be API compatible with Linux,
where it's provided by malloc.h.
(I think the API actually originated with System V. I don't
remember how it was there though. Anyway, I guess the
compatibility with Linux is more important than System V
these days.)
This is the companion to PR #766. It removes the CONFIG_CAN_PASS_STRUCT option as recommended by Issue #620
NuttX PR #766 depends on PR being in place but not vice versa. This PR should be merge-able without #766 and then PR #766 should also pass its checks.
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro
Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Author: anchao <anchao@pinecone.net>
apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage
Loadable apps/: Correct loadable symbol table generate
apps/system/ubloxmodem: Fix build break
apps/examples/ostest: start restart/waitpid/user test from main loop
apps/nshlib: Expand reboot and poweroff commands to include a second, optional mode argument
Author: Gregory Nutt <gnutt@nuttx.org>
An attempt to fix build issues. Does not work.
apps/examples/ostest: Fix some inappropriate renaming of static functions introduced with recent patches.
apps/builtin/exec_builtin.c: Fix a error introduced by recent comments. Found in build testing.
Author: anchao <anchao@pinecone.net>
apps/builtin/exec_builtin.c: Try posix_spawn if builtin apps do not have have an entry point.
apps/Application.mk: introduce MODULE config to simplify tristate(m)
apps/nsh: Change the nuttx shell module type to tristate
apps: Add loadable application support
script/mksymtab: Generate symbol table name by default
apps/builtin: Allow loadable applications can register with apps/builtin.
apps/builtin/exec_builtin.c: Try posix_spawn if builtin apps do not have have an entry point.
apps/Application.mk: introduce MODULE config to simplify tristate(m)
apps/nsh: Change the nuttx shell module type to tristate
apps: Add loadable application support
script/mksymtab: Generate symbol table name by default
apps/builtin: Allow loadable applications can register with apps/builtin.