Skip to content

Commit

Permalink
Kernel: Convert some more syscalls to Userspace<T>
Browse files Browse the repository at this point in the history
These are really straightforward when all the helpers just work.
  • Loading branch information
awesomekling committed Aug 2, 2020
1 parent 9bcf0b7 commit e526fa5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Kernel/Process.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,16 +263,16 @@ class Process : public InlineLinkedListNode<Process> {
int sys$setresuid(uid_t, uid_t, uid_t);
int sys$setresgid(gid_t, gid_t, gid_t);
unsigned sys$alarm(unsigned seconds);
int sys$access(const char* pathname, size_t path_length, int mode);
int sys$access(Userspace<const char*> pathname, size_t path_length, int mode);
int sys$fcntl(int fd, int cmd, u32 extra_arg);
int sys$ioctl(int fd, unsigned request, FlatPtr arg);
int sys$mkdir(const char* pathname, size_t path_length, mode_t mode);
int sys$mkdir(Userspace<const char*> pathname, size_t path_length, mode_t mode);
clock_t sys$times(tms*);
int sys$utime(Userspace<const char*> pathname, size_t path_length, Userspace<const struct utimbuf*>);
int sys$link(const Syscall::SC_link_params*);
int sys$unlink(const char* pathname, size_t path_length);
int sys$symlink(const Syscall::SC_symlink_params*);
int sys$rmdir(const char* pathname, size_t path_length);
int sys$rmdir(Userspace<const char*> pathname, size_t path_length);
int sys$mount(const Syscall::SC_mount_params*);
int sys$umount(const char* mountpoint, size_t mountpoint_length);
int sys$chmod(const char* pathname, size_t path_length, mode_t);
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Syscalls/access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace Kernel {

int Process::sys$access(const char* user_path, size_t path_length, int mode)
int Process::sys$access(Userspace<const char*> user_path, size_t path_length, int mode)
{
REQUIRE_PROMISE(rpath);
auto path = get_syscall_path_argument(user_path, path_length);
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Syscalls/mkdir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace Kernel {

int Process::sys$mkdir(const char* user_path, size_t path_length, mode_t mode)
int Process::sys$mkdir(Userspace<const char*> user_path, size_t path_length, mode_t mode)
{
REQUIRE_PROMISE(cpath);
auto path = get_syscall_path_argument(user_path, path_length);
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Syscalls/rmdir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace Kernel {

int Process::sys$rmdir(const char* user_path, size_t path_length)
int Process::sys$rmdir(Userspace<const char*> user_path, size_t path_length)
{
REQUIRE_PROMISE(cpath);
auto path = get_syscall_path_argument(user_path, path_length);
Expand Down

0 comments on commit e526fa5

Please sign in to comment.