mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:58:11 +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)
|
||||
{
|
||||
if (size < 9)
|
||||
return -ENAMETOOLONG;
|
||||
mmu().copy_to_vm(buffer, "EMULATED", 9);
|
||||
return 0;
|
||||
if (size < 0)
|
||||
return -EINVAL;
|
||||
auto host_buffer = ByteBuffer::create_zeroed((size_t)size);
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue