procgroup capabilities
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m55s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m55s
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include <limine/requests.h>
|
||||
#include <m/status.h>
|
||||
#include <mm/liballoc.h>
|
||||
#include <proc/capability.h>
|
||||
#include <proc/proc.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
struct flanterm_context* ft_ctx;
|
||||
@@ -32,9 +34,12 @@ bool terminal_init (void* arg) {
|
||||
|
||||
void terminal_fini (void) {}
|
||||
|
||||
int terminal_putstr (void* a1, void* a2, void* a3, void* a4) {
|
||||
int terminal_putstr (struct proc* proc, void* a1, void* a2, void* a3, void* a4) {
|
||||
(void)a2, (void)a3, (void)a4;
|
||||
|
||||
if (!(proc->procgroup->capabilities & PROC_CAP_TERMINAL))
|
||||
return -ST_PERMISSION_ERROR;
|
||||
|
||||
char* string = (char*)a1;
|
||||
size_t* len = (size_t*)a2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user