diff options
| author | Shell <[email protected]> | 2024-05-29 18:06:54 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-29 18:06:54 +0800 |
| commit | 63591d935e3a39c6fcb1b735beb419b99d1c8a0b (patch) | |
| tree | 4181bb199ae475ec04503410185e5092978baecc /components | |
| parent | f179ce12b71c01a5fba3b79f00e245178f482483 (diff) | |
[smart] fixup errno passing on sys_mkdir() (#9007)
Use _SYS_WRAP to fetch errno on return of mkdir to avoiding overriding
of it on other system APIs.
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'components')
| -rw-r--r-- | components/lwp/lwp_syscall.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c index 27285e34c5..bac35f4397 100644 --- a/components/lwp/lwp_syscall.c +++ b/components/lwp/lwp_syscall.c @@ -4842,11 +4842,11 @@ sysret_t sys_mkdir(const char *path, mode_t mode) return -EINVAL; } - err = mkdir(kpath, mode); + err = _SYS_WRAP(mkdir(kpath, mode)); kmem_put(kpath); - return (err < 0 ? GET_ERRNO() : err); + return err; #else int ret = mkdir(path, mode); return (ret < 0 ? GET_ERRNO() : ret); |
