mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
Implement sys$chdir() and teach sh+ls to cd around and browse different dirs.
This commit is contained in:
parent
ac738b03d6
commit
2749e7f1c2
16 changed files with 147 additions and 33 deletions
|
@ -51,6 +51,12 @@ int lstat(const char* path, stat* statbuf)
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int chdir(const char* path)
|
||||
{
|
||||
int rc = Syscall::invoke(Syscall::PosixChdir, (dword)path);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
char* getcwd(char* buffer, size_t size)
|
||||
{
|
||||
int rc = Syscall::invoke(Syscall::PosixGetcwd, (dword)buffer, (dword)size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue