Implement TERMINAL_DIMENSIONS op for the terminal device, CE add terminfo command
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m59s

This commit is contained in:
2026-03-05 16:42:02 +01:00
parent 25b289ccfb
commit a346a5667c
9 changed files with 42 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ void terminal_fini (struct device* device) { (void)device; }
int terminal_putstr (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
void* a1, void* a2, void* a3, void* a4) {
(void)a2, (void)a3, (void)a4, (void)device;
(void)a2, (void)a3, (void)a4, (void)device, (void)rctx;
if (!(proc->procgroup->capabilities & PROC_CAP_TERMINAL))
return -ST_PERMISSION_ERROR;
@@ -52,3 +52,15 @@ int terminal_putstr (struct device* device, struct proc* proc, struct reschedule
return ST_OK;
}
int terminal_dimensions (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
void* a1, void* a2, void* a3, void* a4) {
(void)proc, (void)rctx, (void)a3, (void)a4, (void)device;
if (a1 == NULL || a2 == NULL)
return -ST_BAD_ADDRESS_SPACE;
flanterm_get_dimensions (ft_ctx, (size_t*)a1, (size_t*)a2);
return ST_OK;
}