✨ feat(components/lwp/lwp.c): add OS env to default environ
This commit is contained in:
parent
954f1d9b63
commit
e4bd8e00f0
|
@ -1329,6 +1329,7 @@ char **__environ = 0;
|
||||||
|
|
||||||
pid_t exec(char *filename, int debug, int argc, char **argv)
|
pid_t exec(char *filename, int debug, int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
setenv("OS", "RT-Thread", 1);
|
||||||
return lwp_execve(filename, debug, argc, argv, __environ);
|
return lwp_execve(filename, debug, argc, argv, __environ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4584,7 +4584,7 @@ sysret_t sys_uname(struct utsname *uts)
|
||||||
{
|
{
|
||||||
struct utsname utsbuff = {0};
|
struct utsname utsbuff = {0};
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
char *machine;
|
const char *machine;
|
||||||
|
|
||||||
if (!lwp_user_accessable((void *)uts, sizeof(struct utsname)))
|
if (!lwp_user_accessable((void *)uts, sizeof(struct utsname)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue