Skip to content

Commit 0778769

Browse files
committed
tty: expose framebuffer status
1 parent 3140cad commit 0778769

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/include/kernel/tty.h

+1
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ void ttyInit(KernelBootInfo *);
3131
void ttyPutc(char);
3232
void ttyPuts(const char *);
3333
void ttyRemapFramebuffer();
34+
void getTtyStatus(KTTY *);

src/tty/tty.c

+9
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,12 @@ void ttyPuts(const char *s) {
236236
s++;
237237
}
238238
}
239+
240+
/* getTtyStatus(): returns the status of the framebuffer and emulated terminal
241+
* params: b - buffer to store the status
242+
* returns: nothing
243+
*/
244+
245+
void getTtyStatus(KTTY *b) {
246+
memcpy(b, &ktty, sizeof(KTTY));
247+
}

0 commit comments

Comments
 (0)