Remove procgroup capabilities
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m6s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m6s
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include <kb_defs.h>
|
||||
#include <libk/ringbuffer.h>
|
||||
#include <libk/std.h>
|
||||
#include <proc/capability.h>
|
||||
#include <proc/proc.h>
|
||||
#include <proc/reschedule.h>
|
||||
#include <proc/suspension_q.h>
|
||||
@@ -180,9 +179,6 @@ static void ps2kb_irq (void* arg, void* regs, bool user, struct reschedule_ctx*
|
||||
DEFINE_DEVICE_OP (ps2kb_read_key) {
|
||||
uint64_t frb, fsq;
|
||||
|
||||
if (!(proc->procgroup->capabilities & PROC_CAP_KB))
|
||||
return -ST_PERMISSION_ERROR;
|
||||
|
||||
uint8_t* chbuf = (uint8_t*)a1;
|
||||
|
||||
if (chbuf == NULL)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <libk/std.h>
|
||||
#include <limine/requests.h>
|
||||
#include <mm/malloc.h>
|
||||
#include <proc/capability.h>
|
||||
#include <proc/proc.h>
|
||||
#include <status.h>
|
||||
#include <sys/debug.h>
|
||||
@@ -35,9 +34,6 @@ DEFINE_DEVICE_INIT (terminal_init) {
|
||||
DEFINE_DEVICE_FINI (terminal_fini) {}
|
||||
|
||||
DEFINE_DEVICE_OP (terminal_putstr) {
|
||||
if (!(proc->procgroup->capabilities & PROC_CAP_TERMINAL))
|
||||
return -ST_PERMISSION_ERROR;
|
||||
|
||||
char* string = (char*)a1;
|
||||
size_t* len = (size_t*)a2;
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef _KERNEL_PROC_CAPABILITY_H
|
||||
#define _KERNEL_PROC_CAPABILITY_H
|
||||
|
||||
#define PROC_CAP_TERMINAL (1 << 0)
|
||||
#define PROC_CAP_KB (1 << 1)
|
||||
|
||||
#endif // _KERNEL_PROC_CAPABILITY_H
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <limine/requests.h>
|
||||
#include <mm/malloc.h>
|
||||
#include <mm/pmm.h>
|
||||
#include <proc/capability.h>
|
||||
#include <proc/proc.h>
|
||||
#include <proc/procgroup.h>
|
||||
#include <proc/reschedule.h>
|
||||
@@ -344,7 +343,6 @@ void proc_init (void) {
|
||||
proc_register (spin_proc, thiscpu, &rctx);
|
||||
|
||||
struct proc* init = proc_from_file (thiscpu->kproc, "RD", "/init", &rctx);
|
||||
init->procgroup->capabilities |= (PROC_CAP_TERMINAL | PROC_CAP_KB);
|
||||
proc_register (init, thiscpu, &rctx);
|
||||
|
||||
spin_lock (&spin_proc->cpu->lock, &fc);
|
||||
|
||||
@@ -35,7 +35,6 @@ struct procgroup {
|
||||
struct list_node_link* mappings;
|
||||
uintptr_t map_base;
|
||||
struct procgroup_tls tls;
|
||||
uint64_t capabilities;
|
||||
};
|
||||
|
||||
struct procgroup* procgroup_create (void);
|
||||
|
||||
Reference in New Issue
Block a user