terminal.h 574 B

123456789101112131415161718
  1. /* Terminal-in-a-window: per-instance state and the prompt/echo loop. */
  2. #ifndef TERMINAL_H
  3. #define TERMINAL_H
  4. #include "screen.h"
  5. #include "vfs.h"
  6. struct term {
  7. struct text_screen screen;
  8. char cwd[VFS_PATH_MAX]; /* absolute current working directory */
  9. char path[VFS_PATH_MAX]; /* command search path (colon separated) */
  10. };
  11. /* Ring-3 terminal: run a privileged kernel command as a kernel process with
  12. * output on `tty` (the command table and handlers stay in terminal.c). */
  13. int term_kcmd_spawn(const char *name, const char *args, unsigned int tty);
  14. #endif