Skip to content

Commit 63591d9

Browse files
authored
[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]>
1 parent f179ce1 commit 63591d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: components/lwp/lwp_syscall.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4842,11 +4842,11 @@ sysret_t sys_mkdir(const char *path, mode_t mode)
48424842
return -EINVAL;
48434843
}
48444844

4845-
err = mkdir(kpath, mode);
4845+
err = _SYS_WRAP(mkdir(kpath, mode));
48464846

48474847
kmem_put(kpath);
48484848

4849-
return (err < 0 ? GET_ERRNO() : err);
4849+
return err;
48504850
#else
48514851
int ret = mkdir(path, mode);
48524852
return (ret < 0 ? GET_ERRNO() : ret);

0 commit comments

Comments
 (0)