tty_posix.c (751B)
1 /* see LICENSE file for copyright and license details */ 2 #include "../filesystem.h" 3 #include "../paths.h" 4 #include "../util.h" 5 6 #include <stddef.h> 7 8 /* a kernel with no backend: the numbers are the ones its dev_t holds, 9 * and no name is known for them */ 10 #if !defined(__linux__) || defined(ARUU_FORCE_POSIX) 11 void 12 devtotty(int dev, int *tty_maj, int *tty_min) 13 { 14 *tty_maj = fs_devmajor(dev); 15 *tty_min = fs_devminor(dev); 16 } 17 18 int 19 ttytostr(int tty_maj, int tty_min, char *str, size_t n) 20 { 21 (void)tty_maj; 22 (void)tty_min; 23 if (n < 2) 24 return -1; 25 str[0] = '?'; 26 str[1] = '\0'; 27 return 0; 28 } 29 30 const char * 31 ttyconsole(void) 32 { 33 return ARUU_PATH_DEVCONSOLE; 34 } 35 36 const char * 37 ttyconsterm(void) 38 { 39 return "vt100"; 40 } 41 42 void 43 ttyhangup(void) 44 { 45 } 46 #endif