Searched defs:ttynum (Results 1 - 9 of 9) sorted by relevance

/lxc/src/python-lxc/examples/
H A Dpyconsole.py33 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 Dpyconsole-vte.py38 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/lxc/
H A Dcommands.h68 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 Dconsole.c361 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 Dcommands.c197 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 Darguments.h64 unsigned int ttynum; member in struct:lxc_arguments
H A Dlxccontainer.c483 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/tests/
H A Dconsole.c59 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/python-lxc/
H A Dlxc.c799 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...]

Completed in 30 milliseconds