1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:12:08 +00:00

Kernel: Remove the per-process icon_id and sys$set_process_icon()

This was a goofy kernel API where you could assign an icon_id (int) to
a process which referred to a global shbuf with a 16x16 icon bitmap
inside it.

Instead of this, programs that want to display a process icon now
retrieve it from the process executable instead.
This commit is contained in:
Andreas Kling 2020-12-27 01:13:23 +01:00
parent cb68b8ff8b
commit 0e2b7f9c9a
12 changed files with 0 additions and 47 deletions

View file

@ -41,20 +41,6 @@ pid_t Process::sys$getppid()
return m_ppid.value();
}
int Process::sys$set_process_icon(int icon_id)
{
REQUIRE_PROMISE(shared_buffer);
LOCKER(shared_buffers().lock());
auto it = shared_buffers().resource().find(icon_id);
if (it == shared_buffers().resource().end())
return -EINVAL;
auto& shared_buffer = *(*it).value;
if (!shared_buffer.is_shared_with(m_pid))
return -EPERM;
m_icon_id = icon_id;
return 0;
}
int Process::sys$get_process_name(Userspace<char*> buffer, size_t buffer_size)
{
REQUIRE_PROMISE(stdio);