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);