When device not support byte read or readlen less than
device block size, will use `dev->buffer` as dst address.
`CFGDIOC_FIRSTCONFIG` and `CFGDIOC_NEXTCONFIG` should also
malloc buffer before call `mtdconfig_readbytes`.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
common/arm_assert.c:80:14: warning: format specifies type 'unsigned int' but the argument has type 'uint32_t' (aka 'unsigned long') [-Wformat]
stack, ptr[0], ptr[1], ptr[2], ptr[3],
^~~~~
include/debug.h:119:59: note: expanded from macro '_alert'
__arch_syslog(LOG_EMERG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
~~~~~~ ^~~~~~~~~~~
Signed-off-by: chao.an <anchao@xiaomi.com>
Summary:
- Cast to unsigned char for strcmp and strncmp
- strcmp and strncmp are described following by opengroup.org
The sign of a non-zero return value shall be determined by the sign
of the difference between the values of the first pair of bytes
(both interpreted as type unsigned char) that differ in the strings
being compared.
https://pubs.opengroup.org/onlinepubs/9699919799/functions/strcmp.htmlhttps://pubs.opengroup.org/onlinepubs/9699919799/functions/strncmp.html
Impact:
- strcmp and strncmp return value
Testing:
- ostest on sabre-6quad:smp w/ qemu
Signed-off-by: Oki Minabe <minabe.oki@gmail.com>
Summary:
- Correct boardctl function's return value
- In case of BOARDIOC_TESTSET, `ret' has 0 or 1 or an error,
but `ret' is ignored except error.
Impact:
- boardctl return value except errors
Testing:
- custom Cortex-A9 board
Signed-off-by: Oki Minabe <minabe.oki@gmail.com>
Summary:
- I noticed that maix-bit:smp does not work with QEMU.
- Actually, QEMU supports sifive_u (not K210) but it works
if FPU is disabled.
- This commit fixes this issue.
Impact:
- K210 with QEMU only
Testing:
- Tested with qemu-5.2
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Selecting this option will pass "-Map=$(TOPDIR)$(DELIM)nuttx.map" to ld
when linking NuttX ELF. That file can be useful for verifying
and debugging magic section games, and for seeing which
pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS.
Signed-off-by: chao.an <anchao@xiaomi.com>
Enable this option to optimization the unused input sections with the
linker by compiling with " -ffunction-sections -fdata-sections ", and
linking with " --gc-sections ".
Signed-off-by: chao.an <anchao@xiaomi.com>
This keeps backwards compatibility with apps that do not provide
envp. The old implementation passes NULL always and this change fixes
any regression caused by it.
Now that the environment strings are stored as an array of strings,
they can be passed from the application via char **environ, which
is really defined as a function call to get_environ_ptr().
This works as is for flat build, but protected mode and kernel mode
require a call gate, which is added here.