test_vt: add --vt=<path> option
This new option allows specifying a path to the VT that should be used. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
6818fe2d32
commit
7eae29e5cb
@ -69,7 +69,10 @@ static void print_help()
|
|||||||
"given multiple times, only the last argument matters if not otherwise stated.\n"
|
"given multiple times, only the last argument matters if not otherwise stated.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"General Options:\n"
|
"General Options:\n"
|
||||||
TEST_HELP,
|
TEST_HELP
|
||||||
|
"\n"
|
||||||
|
"VT Options:\n"
|
||||||
|
"\t --vt <vt> [-] Path to VT to use\n",
|
||||||
"test_vt");
|
"test_vt");
|
||||||
/*
|
/*
|
||||||
* 80 char line:
|
* 80 char line:
|
||||||
@ -81,8 +84,11 @@ static void print_help()
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *vtpath = NULL;
|
||||||
|
|
||||||
struct conf_option options[] = {
|
struct conf_option options[] = {
|
||||||
TEST_OPTIONS
|
TEST_OPTIONS,
|
||||||
|
CONF_OPTION_STRING(0, "vt", &vtpath, NULL),
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
@ -107,7 +113,7 @@ int main(int argc, char **argv)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_vtm;
|
goto err_vtm;
|
||||||
|
|
||||||
ret = uterm_vt_allocate(vtm, &vt, "seat0", input, NULL, NULL, NULL);
|
ret = uterm_vt_allocate(vtm, &vt, "seat0", input, vtpath, NULL, NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_input;
|
goto err_input;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user