mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:38:13 +00:00
Kernel: Pass characters+length to readlink()
Note that I'm developing some helper types in the Syscall namespace as I go here. Once I settle on some nice types, I will convert all the other syscalls to use them as well.
This commit is contained in:
parent
5c3c2a9bac
commit
0695ff8282
4 changed files with 37 additions and 12 deletions
|
@ -305,6 +305,12 @@ struct SyscallString {
|
|||
size_t length { 0 };
|
||||
};
|
||||
|
||||
template<typename DataType, typename SizeType>
|
||||
struct MutableBufferArgument {
|
||||
DataType* data { nullptr };
|
||||
SizeType size { 0 };
|
||||
};
|
||||
|
||||
struct SyscallStringList {
|
||||
SyscallString* strings { nullptr };
|
||||
size_t length { 0 };
|
||||
|
@ -316,6 +322,11 @@ struct SC_execve_params {
|
|||
SyscallStringList environment;
|
||||
};
|
||||
|
||||
struct SC_readlink_params {
|
||||
SyscallString path;
|
||||
MutableBufferArgument<char, size_t> buffer;
|
||||
};
|
||||
|
||||
void initialize();
|
||||
int sync();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue