Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
x11spice
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spice
x11spice
Commits
ea966669
Commit
ea966669
authored
Nov 01, 2016
by
Jeremy White
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow a command line override of the allow-control config choice.
parent
638b9968
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/options.c
src/options.c
+8
-1
No files found.
src/options.c
View file @
ea966669
...
@@ -144,6 +144,7 @@ static void usage(options_t *options, char *argv0)
...
@@ -144,6 +144,7 @@ static void usage(options_t *options, char *argv0)
printf
(
"
\n
"
);
printf
(
"
\n
"
);
printf
(
"Options:
\n
"
);
printf
(
"Options:
\n
"
);
printf
(
"%s [--allow-control]
\n
"
,
indent
);
printf
(
"%s [--allow-control]
\n
"
,
indent
);
printf
(
"%s [--no-allow-control]
\n
"
,
indent
);
printf
(
"%s [--timeout=<seconds>]
\n
"
,
indent
);
printf
(
"%s [--timeout=<seconds>]
\n
"
,
indent
);
printf
(
"%s [--display=<DISPLAY>]
\n
"
,
indent
);
printf
(
"%s [--display=<DISPLAY>]
\n
"
,
indent
);
printf
(
"%s [--generate-password[=<len>]
\n
"
,
indent
);
printf
(
"%s [--generate-password[=<len>]
\n
"
,
indent
);
...
@@ -227,7 +228,8 @@ int options_parse_arguments(int argc, char *argv[], options_t *options)
...
@@ -227,7 +228,8 @@ int options_parse_arguments(int argc, char *argv[], options_t *options)
int
rc
;
int
rc
;
int
longindex
=
0
;
int
longindex
=
0
;
enum
option_types
{
OPTION_ALLOW_CONTROL
,
OPTION_TIMEOUT
,
OPTION_AUTO
,
OPTION_HIDE
,
enum
option_types
{
OPTION_ALLOW_CONTROL
,
OPTION_DISALLOW_CONTROL
,
OPTION_TIMEOUT
,
OPTION_AUTO
,
OPTION_HIDE
,
OPTION_PASSWORD
,
OPTION_PASSWORD_FILE
,
OPTION_CONFIG
,
OPTION_SSL
,
OPTION_PASSWORD
,
OPTION_PASSWORD_FILE
,
OPTION_CONFIG
,
OPTION_SSL
,
OPTION_GENERATE_PASSWORD
,
OPTION_DISPLAY
,
OPTION_MINIMIZE
,
OPTION_GENERATE_PASSWORD
,
OPTION_DISPLAY
,
OPTION_MINIMIZE
,
OPTION_HELP
OPTION_HELP
...
@@ -236,6 +238,7 @@ int options_parse_arguments(int argc, char *argv[], options_t *options)
...
@@ -236,6 +238,7 @@ int options_parse_arguments(int argc, char *argv[], options_t *options)
static
struct
option
long_options
[]
=
static
struct
option
long_options
[]
=
{
{
{
"allow-control"
,
0
,
0
,
OPTION_ALLOW_CONTROL
},
{
"allow-control"
,
0
,
0
,
OPTION_ALLOW_CONTROL
},
{
"no-allow-control"
,
0
,
0
,
OPTION_DISALLOW_CONTROL
},
{
"timeout"
,
1
,
0
,
OPTION_TIMEOUT
},
{
"timeout"
,
1
,
0
,
OPTION_TIMEOUT
},
{
"auto"
,
1
,
0
,
OPTION_AUTO
},
{
"auto"
,
1
,
0
,
OPTION_AUTO
},
{
"hide"
,
0
,
0
,
OPTION_HIDE
},
{
"hide"
,
0
,
0
,
OPTION_HIDE
},
...
@@ -262,6 +265,10 @@ int options_parse_arguments(int argc, char *argv[], options_t *options)
...
@@ -262,6 +265,10 @@ int options_parse_arguments(int argc, char *argv[], options_t *options)
options
->
allow_control
=
1
;
options
->
allow_control
=
1
;
break
;
break
;
case
OPTION_DISALLOW_CONTROL
:
options
->
allow_control
=
0
;
break
;
case
OPTION_TIMEOUT
:
case
OPTION_TIMEOUT
:
options
->
timeout
=
atol
(
optarg
);
options
->
timeout
=
atol
(
optarg
);
break
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment