Searched refs:ttynum (Results 1 - 13 of 13) 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/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/lxc/
H A Dconsole.h65 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 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.h575 * \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 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/lxc/tools/
H A Dlxc_console.c62 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__.py258 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 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 79 milliseconds