From 7eae29e5cb36cc6a738702eff7de69ec98e41af0 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 11 Nov 2012 11:37:17 +0100 Subject: [PATCH] test_vt: add --vt= option This new option allows specifying a path to the VT that should be used. Signed-off-by: David Herrmann --- tests/test_vt.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/test_vt.c b/tests/test_vt.c index f8e5e56..3cca8c7 100644 --- a/tests/test_vt.c +++ b/tests/test_vt.c @@ -69,7 +69,10 @@ static void print_help() "given multiple times, only the last argument matters if not otherwise stated.\n" "\n" "General Options:\n" - TEST_HELP, + TEST_HELP + "\n" + "VT Options:\n" + "\t --vt [-] Path to VT to use\n", "test_vt"); /* * 80 char line: @@ -81,8 +84,11 @@ static void print_help() */ } +static const char *vtpath = NULL; + struct conf_option options[] = { - TEST_OPTIONS + TEST_OPTIONS, + CONF_OPTION_STRING(0, "vt", &vtpath, NULL), }; int main(int argc, char **argv) @@ -107,7 +113,7 @@ int main(int argc, char **argv) if (ret) 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) goto err_input;