mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 20:57:41 +00:00
UserspaceEmulator: Don't just return "EMULATED" in get_process_name()
Now that emulated processes have their real name (with a "(UE)" prefix) we can actually let them know their name.
This commit is contained in:
parent
308d3b764f
commit
9def88e08d
1 changed files with 6 additions and 4 deletions
|
@ -559,10 +559,12 @@ int Emulator::virt$set_mmap_name(FlatPtr)
|
||||||
|
|
||||||
int Emulator::virt$get_process_name(FlatPtr buffer, int size)
|
int Emulator::virt$get_process_name(FlatPtr buffer, int size)
|
||||||
{
|
{
|
||||||
if (size < 9)
|
if (size < 0)
|
||||||
return -ENAMETOOLONG;
|
return -EINVAL;
|
||||||
mmu().copy_to_vm(buffer, "EMULATED", 9);
|
auto host_buffer = ByteBuffer::create_zeroed((size_t)size);
|
||||||
return 0;
|
int rc = syscall(SC_get_process_name, host_buffer.data(), host_buffer.size());
|
||||||
|
mmu().copy_to_vm(buffer, host_buffer.data(), host_buffer.size());
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Emulator::virt$lseek(int fd, off_t offset, int whence)
|
int Emulator::virt$lseek(int fd, off_t offset, int whence)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue