/lxc/src/python-lxc/examples/ |
H A D | pyconsole.py | 33 ttynum = -1 variable 36 sys.exit("Usage: %s container-name [ttynum [escape]]" % sys.argv[0]) 38 ttynum = int(sys.argv[2]) variable 45 (ct.name, ttynum, ord('a') + escape-1)) 52 ct.console(ttynum, 0, 1, 2, escape)
|
H A D | pyconsole-vte.py | 38 def vte_con(ct, ttynum): 40 masterfd = ct.console_getfd(ttynum) 65 ttynum = -1 variable 67 sys.exit("Usage: %s container-name [ttynum]" % sys.argv[0]) 69 ttynum = int(sys.argv[2]) variable 73 print("Container:%s tty:%d" % (ct.name, ttynum)) 79 vte_con(ct, ttynum)
|
/lxc/src/tests/ |
H A D | console.c | 59 int ttynum [MAXCONSOLES]; local 64 ttynum[i] = ttyfd[i] = masterfd[i] = -1; 66 ttynum[0] = 1; 67 ret = c->console_getfd(c, &ttynum[0], &masterfd[0]); 73 if (ttynum[0] != 1) { 74 TSTERR("console allocate got bad ttynum %d", ttynum[0]); 78 /* attempt to alloc same ttynum */ 79 ret = c->console_getfd(c, &ttynum[0], &masterfd[1]); 81 TSTERR("console allocate should fail for allocated ttynum [all...] |
/lxc/src/lxc/ |
H A D | console.h | 65 extern int lxc_console_allocate(struct lxc_conf *conf, int sockfd, int *ttynum); 121 extern int lxc_console(struct lxc_container *c, int ttynum, 128 * Set ttynum to -1 to allocate the first available pty, or to a value within 131 extern int lxc_console_getfd(struct lxc_container *c, int *ttynum,
|
H A D | commands.h | 68 int ttynum; member in struct:lxc_cmd_console_rsp_data 72 extern int lxc_cmd_console(const char *name, int *ttynum, int *fd,
|
H A D | console.c | 361 int masterfd = -1, ttynum; local 380 ttynum = *ttyreq; 385 for (ttynum = 1; ttynum <= tty_info->nbtty && tty_info->pty_info[ttynum - 1].busy; ttynum++) 389 if (ttynum > tty_info->nbtty) 392 *ttyreq = ttynum; 395 tty_info->pty_info[ttynum - 1].busy = sockfd; 396 masterfd = tty_info->pty_info[ttynum 651 lxc_console_getfd(struct lxc_container *c, int *ttynum, int *masterfd) argument 656 lxc_console(struct lxc_container *c, int ttynum, int stdinfd, int stdoutfd, int stderrfd, int escape) argument [all...] |
H A D | commands.c | 197 rspdata->ttynum = PTR_TO_INT(rsp->data); 696 * @ttynum : in: the tty to open or -1 for next available 703 int lxc_cmd_console(const char *name, int *ttynum, int *fd, const char *lxcpath) argument 708 .req = { .cmd = LXC_CMD_CONSOLE, .data = INT_TO_PTR(*ttynum) }, 722 ERROR("Console %d invalid, busy or all consoles busy.", *ttynum); 729 ERROR("Unable to allocate fd for tty %d.", rspdata->ttynum); 735 *ttynum = rspdata->ttynum; 736 INFO("tty %d allocated fd %d sock %d.", rspdata->ttynum, *fd, ret); 745 int ttynum local [all...] |
H A D | arguments.h | 64 unsigned int ttynum; member in struct:lxc_arguments
|
H A D | lxccontainer.h | 575 * \param[in,out] ttynum Terminal number to attempt to allocate, 582 * \note On successful return, \p ttynum will contain the tty number 589 int (*console_getfd)(struct lxc_container *c, int *ttynum, int *masterfd); 595 * \param ttynum Terminal number to attempt to allocate, \c -1 to 608 int (*console)(struct lxc_container *c, int ttynum,
|
H A D | lxccontainer.c | 483 static int do_lxcapi_console_getfd(struct lxc_container *c, int *ttynum, int *masterfd) argument 489 ttyfd = lxc_console_getfd(c, ttynum, masterfd); 495 static int lxcapi_console(struct lxc_container *c, int ttynum, int stdinfd, argument 504 ret = lxc_console(c, ttynum, stdinfd, stdoutfd, stderrfd, escape);
|
/lxc/src/lxc/tools/ |
H A D | lxc_console.c | 62 if (lxc_safe_uint(arg, &args->ttynum) < 0) 93 .ttynum = -1, 148 ret = c->console(c, my_args.ttynum, 0, 1, 2, my_args.escape);
|
/lxc/src/python-lxc/lxc/ |
H A D | __init__.py | 258 def console(self, ttynum=-1, stdinfd=0, stdoutfd=1, stderrfd=2, escape=1): 266 return _lxc.Container.console(self, ttynum, stdinfd, stdoutfd, 269 def console_getfd(self, ttynum=-1): 277 return _lxc.Container.console_getfd(self, ttynum)
|
/lxc/src/python-lxc/ |
H A D | lxc.c | 799 static char *kwlist[] = {"ttynum", "stdinfd", "stdoutfd", "stderrfd", 801 int ttynum = -1, stdinfd = 0, stdoutfd = 1, stderrfd = 2, escape = 1; local 804 &ttynum, &stdinfd, &stdoutfd, &stderrfd, 808 if (self->container->console(self->container, ttynum, 818 static char *kwlist[] = {"ttynum", NULL}; 819 int ttynum = -1, masterfd; local 821 if (! PyArg_ParseTupleAndKeywords(args, kwds, "|i", kwlist, &ttynum)) 824 if (self->container->console_getfd(self->container, &ttynum, 1630 "console(ttynum = -1, stdinfd = 0, stdoutfd = 1, stderrfd = 2, " 1637 "console(ttynum [all...] |