liuhaitao
8637e2a550
Merge remote-tracking branch 'remotes/mirtos/dev-nuttx-10.1-20210927' into dev
...
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: If5a0166dbc7c9a595db9b7758cbacaf6af278d5d
2021-10-18 22:12:06 +08:00
anjiahao
b82c943d92
fix time_t overflow
...
VELAPLATFO-442
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: I93d2b9bb4e3e7c3a595a688becc3fa08b61b8c91
2021-10-18 11:39:45 +08:00
Xiang Xiao
1158068ade
libc/vsprintf_internal: Call va_copy just like vsyslog
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I96cf364d9a6d438bcca4bf01f1a56c6cc172d19c
2021-10-11 12:04:38 +08:00
Xiang Xiao
7a017b5be0
lib/vasprintf: Shouldn't call va_end(ap) to avoid the double free
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I20e10803e7923fbbd8b5fdccca1fdb4c9d090434
2021-10-11 12:04:38 +08:00
liuhaitao
999fe1f9f8
Merge remote-tracking branch 'mirtos/master' into dev
...
Last commit id:
commit 649f99ce30 (mirtos/master)
Author: FASTSHIFT <vifextech@foxmail.com>
Date: Wed Sep 22 15:38:43 2021 +0800
libc/misc: add lib_glob.
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I2f584a4432f835c661e3c02cf7324d5e92e9c738
2021-09-26 21:59:56 +08:00
FASTSHIFT
649f99ce30
libc/misc: add lib_glob.
...
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
2021-09-25 07:54:39 -03:00
FASTSHIFT
f3477a86d2
libc/string: add lib_strchrnul.
2021-09-22 09:20:06 -03:00
Abdelatif Guettouche
0aa4f07e93
libc/sched/sched_backtrace.c: Include unistd.h to avoid warning about
...
getpid function.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-09-21 09:22:28 -03:00
Juha Niskanen
17bfa18679
libc/unistd: getopt: add some NULL pointer checks
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-09-13 22:44:00 +08:00
Jiuzhu Dong
c68880c0d7
getaddrinfo: support AF_RPMSG
...
The hostname is as rp_cpu, the servname is as rp_name
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-13 08:57:44 +08:00
Jiuzhu Dong
352f636b38
getaddrinfo: support AF_LOCAL
...
the hostname is as sun_path.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-13 08:57:44 +08:00
Jiuzhu Dong
dfb4b6e3d8
lib_vsprintf: Add %pV format support
...
test case:
void test(const char *fmt, ...)
{
struct va_format vaf;
va_list ap;
va_start(ap, fmt);
vaf.fmt = fmt;
vaf.va = ≈
printf("func:%s, %pV, line:%d\n", __func__, &vaf, __LINE__);
va_end(ap);
}
int main(int argc, FAR char *argv[])
{
char str[] = "Hello Boy and Girl!";
int count = 10;
test("%s %d", str, count);
return 0;
}
>> test
func:test, Hello Boy and Girl! 10, line:49
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 21:14:46 +08:00
Jiuzhu Dong
2438403f23
libc/rexec/rexec_af: support remote execution
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 21:14:06 +08:00
Jiuzhu Dong
d8ea482b58
errno: use staic errno to replace tl_errno before tls initialization
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:48:31 +08:00
Jiuzhu Dong
34397094d7
lib_fread: return the number of bytes actually read when error occurs.
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:36:03 +08:00
Jiuzhu Dong
aa1c65a364
errno: use staic errno to replace tl_errno before tls initialization
...
Change-Id: I44a53b2f5cdb3f4e6c755e5663867cd74361bc7c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 21:18:32 +08:00
Jiuzhu Dong
06ef56386b
getaddrinfo: support AF_RPMSG
...
The hostname is as rp_cpu, the servname is as rp_name
Change-Id: Icc2128f26192fe71e657dc6b65cec6f104d31aa2
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 15:29:33 +08:00
Jiuzhu Dong
a214fe03eb
getaddrinfo: support AF_LOCAL
...
Change-Id: I1e6a5d3cb64acaeeecad49315ea5e5874bc9440e
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 15:29:33 +08:00
Jiuzhu Dong
3149af15b9
lib_fread: return the number of bytes when error occurs.
...
Change-Id: I12228f53cf928c9f29bf739e57a25bca120a9ec1
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-07 22:10:31 +08:00
Alin Jerpelea
a9bfe50fe1
author: Brennan Ashton: update licenses to Apache
...
Brennan Ashton has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
Alin Jerpelea
abf8a72ef0
LICENSE: add libs/libc/math/ to license file
...
Add Sun Microsystems license for libs/libc/math/__sin.c
and libs/libc/math/__cos.c
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
Alin Jerpelea
4e5a9b168a
libs: libc: armv8-m: revert to original license
...
Revert to the BSD Arm lincese
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
Neo Xu
5941532fb5
libc/gettext: Initialize path field when creating mofile struct.
...
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2021-09-01 14:35:24 -03:00
Xu Xingliang
e42c3ea8a8
libc/gettext: Initialize path field when creating mofile struct.
...
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Change-Id: Ic88876b254e29ac6156f8b2b15c5321af62f4e24
2021-08-31 18:18:02 +08:00
zhuyanlin
af3d84cb19
libc:machine: add atomic_load/store/exchange API
...
Add atomic_load/store/exchange API
Change-Id: I6196b077d1e76cd1e0506ee66e2885e541525eb1
2021-08-31 14:16:34 +08:00
Jiuzhu Dong
4743c089d0
libc/rexec: support remote execution
...
Change-Id: I0f61326081f87d9bdf7234088f352328b8828adb
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 10:19:09 +08:00
zhuyanlin
e01e5f5008
libc:machine: add atomic_load/store/exchange API
...
Add atomic_load/store/exchange API
Change-Id: I6196b077d1e76cd1e0506ee66e2885e541525eb1
2021-08-30 11:10:11 +08:00
zhuyanlin
45e5d39fe0
libc:machine: add common atomic operation.
...
Add common atomic operation.
Change-Id: I9f6b891f1406d54871a3f50c217a1029b434d2e8
2021-08-29 16:09:56 +08:00
zhuyanlin
3da0bb7829
libc:machine: add common atomic operation.
...
Add common atomic operation.
Change-Id: I9f6b891f1406d54871a3f50c217a1029b434d2e8
2021-08-28 13:17:30 -03:00
Xiang Xiao
8f976669a3
libc: Remove the legacy printf support
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-28 09:26:30 +08:00
panran
2568cc1212
nuttx:Correct code comment errors
...
N/A
Signed-off-by: panran <panran@xiaomi.com>
Change-Id: I9c9fa0855ae7851b7268a7ace6b5a86d5562a6b1
2021-08-27 20:21:19 +02:00
Jiuzhu Dong
7561882938
lib_vsprintf: Add %pV format support
...
test case:
void test(const char *fmt, ...)
{
struct va_format vaf;
va_list ap;
va_start(ap, fmt);
vaf.fmt = fmt;
vaf.va = ≈
printf("func:%s, %pV, line:%d\n", __func__, &vaf, __LINE__);
va_end(ap);
}
int main(int argc, FAR char *argv[])
{
char str[] = "Hello Boy and Girl!";
int count = 10;
test("%s %d", str, count);
return 0;
}
>> test
func:test, Hello Boy and Girl! 10, line:49
Change-Id: I6d97515dce3f10a880145a1ff7fcba5e9cbebd37
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-27 11:08:48 +08:00
pengyiqiang
b8f12c357f
libc/misc: add lib_glob.
...
N/A
Change-Id: I1bace79c4c580e3a7e84aaf37e7963f789a896ef
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2021-08-26 16:57:07 +08:00
buyuer
33320329ec
vfs: writev should return the partial write size.
...
Signed-off-by: buyuer <dingddding@163.com>
2021-08-26 13:28:11 +08:00
丁欣童
5738f26938
vfs: writev should return the partial write size
...
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: Id7f161fa51a9ad66dad265cab125deb3323e6602
2021-08-26 10:19:56 +08:00
Xiang Xiao
d242861c44
libc: Remove the legacy printf support
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-25 12:55:36 -07:00
pengyiqiang
01cbfec897
libc/string: fix lib_strchrnul warning.
...
N/A
Change-Id: I4661a42923b7e2f59155c734cba2131bddb94211
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2021-08-25 15:08:37 +08:00
pengyiqiang
57e4394dbd
libc/string: add lib_strchrnul.
...
N/A
Change-Id: I25e2424e91b833815680d2e417f4384ed9062660
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2021-08-20 16:41:52 +08:00
chao.an
1060953567
sched/backtrace: add sched_backtrace support
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-19 01:30:50 -07:00
chao.an
83964231a5
libs/libc: move the backtrace implement to sched
...
1. move the backtrace implement to sched
2. rename CONFIG_UNWINDER to CONFIG_SCHED_BACKTRACE
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-19 01:30:50 -07:00
chao.an
7f192ca255
sched/backtrace: add sched_backtrace support
...
Change-Id: Ia764cf54dfa215b313f9d5f1a060aac18d765982
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-18 19:36:38 +08:00
chao.an
db06f769ff
libs/libc: move the backtrace implement to sched
...
1. move the backtrace implement to sched
2. rename CONFIG_UNWINDER to CONFIG_SCHED_BACKTRACE
Change-Id: I8176727602bfc695184b88210a3aaf90c6acaac7
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-18 19:36:23 +08:00
jordi
cd2fbf0b3c
Kconfig: add quotes in source to clean warnings from setconfig
...
To avoid the setconfig warning "style: quotes recommended around xxx in
source xxx"
Change-Id: Iaec3ae59ba2ec15337652c9962b25081ff03e1d7
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-18 19:35:59 +08:00
Xiang Xiao
622c637832
fs/userfs: Support fchstat and chstat callback
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 18:18:52 +08:00
Xiang Xiao
a09f262f1e
fs/userfs: Support fchstat and chstat callback
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 14:57:48 -03:00
Xiang Xiao
6c61d032db
fs: Add utimens and lutimens
...
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 17:55:44 -03:00
Xiang Xiao
7afb3354cc
fs: Add utimens and lutimens
...
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 21:09:35 +08:00
Xiang Xiao
ad827673b2
Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
...
since boardctl isn't a libc feature
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If32db0451e10fb02e0c12ed48f2b7120859b8ae3
2021-08-09 21:03:17 +08:00
Xiang Xiao
4bffde887d
Rename LIB_ to LIBC_ for all libc Kconfig
...
follow other libc component naming convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I66cf8f3201560ce71576279640e94ae3147ad0a2
2021-08-09 21:03:17 +08:00
liuhaitao
6442b8ea2d
Revert "libc: Implement fesetround & fegetround for arm"
...
The updated GNU Arm Embedded Toolchain Version 10.3-2021.07 has implemented
fesetround & fegetround.
This reverts commit 5c0a079aea .
Change-Id: I6418c1f47a6c1a319a2973f01340480d50f54e8e
2021-08-09 20:02:47 +08:00