mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-22 04:24:37 +00:00
Implement basic chmod() syscall and /bin/chmod helper.
Only raw octal modes are supported right now. This patch also changes mode_t from 32-bit to 16-bit to match the on-disk type used by Ext2FS. I also ran into EPERM being errno=0 which was confusing, so I inserted an ESUCCESS in its place.
This commit is contained in:
@@ -97,7 +97,7 @@ int open(const char* path, int options, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, options);
|
||||
int rc = syscall(SC_open, path, options, va_arg(ap, mode_t));
|
||||
int rc = syscall(SC_open, path, options, (mode_t)va_arg(ap, unsigned));
|
||||
va_end(ap);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user