Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
4f73691a
Commit
4f73691a
authored
12 years ago
by
Dmitry Simonenko
Browse files
Options
Downloads
Patches
Plain Diff
client-version: added version output and man updated.
parent
c15ead94
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
client/tarantool/tc.c
+3
-0
3 additions, 0 deletions
client/tarantool/tc.c
client/tarantool/tc_opt.c
+17
-1
17 additions, 1 deletion
client/tarantool/tc_opt.c
client/tarantool/tc_opt.h
+5
-0
5 additions, 0 deletions
client/tarantool/tc_opt.h
doc/man/tarantool.pod
+19
-4
19 additions, 4 deletions
doc/man/tarantool.pod
with
44 additions
and
5 deletions
client/tarantool/tc.c
+
3
−
0
View file @
4f73691a
...
...
@@ -101,6 +101,9 @@ int main(int argc, char *argv[])
case
TC_OPT_USAGE
:
tc_opt_usage
();
break
;
case
TC_OPT_VERSION
:
tc_opt_version
();
break
;
case
TC_OPT_RPL
:
tc_connect
();
rc
=
tc_wal_remote
();
...
...
This diff is collapsed.
Click to expand it.
client/tarantool/tc_opt.c
+
17
−
1
View file @
4f73691a
...
...
@@ -52,7 +52,9 @@ static const void *tc_options_def = gopt_start(
gopt_option
(
'R'
,
GOPT_ARG
,
gopt_shorts
(
'R'
),
gopt_longs
(
"rpl"
),
" <lsn>"
,
"act as replica for the specified server"
),
gopt_option
(
'h'
,
0
,
gopt_shorts
(
'h'
,
'?'
),
gopt_longs
(
"help"
),
NULL
,
"display this help and exit"
)
NULL
,
"display this help and exit"
),
gopt_option
(
'v'
,
0
,
gopt_shorts
(
'v'
),
gopt_longs
(
"version"
),
NULL
,
"display version information and exit"
)
);
void
tc_opt_usage
(
void
)
...
...
@@ -63,6 +65,14 @@ void tc_opt_usage(void)
exit
(
0
);
}
void
tc_opt_version
(
void
)
{
printf
(
"tarantool client, version %s.%s
\n
"
,
TC_VERSION_MAJOR
,
TC_VERSION_MINOR
);
exit
(
0
);
}
enum
tc_opt_mode
tc_opt_init
(
struct
tc_opt
*
opt
,
int
argc
,
char
**
argv
)
{
/* usage */
...
...
@@ -72,6 +82,12 @@ enum tc_opt_mode tc_opt_init(struct tc_opt *opt, int argc, char **argv)
goto
done
;
}
/* version */
if
(
gopt
(
tc_options
,
'v'
))
{
opt
->
mode
=
TC_OPT_VERSION
;
goto
done
;
}
/* server host */
gopt_arg
(
tc_options
,
'a'
,
&
opt
->
host
);
if
(
opt
->
host
==
NULL
)
...
...
This diff is collapsed.
Click to expand it.
client/tarantool/tc_opt.h
+
5
−
0
View file @
4f73691a
...
...
@@ -26,8 +26,12 @@
* SUCH DAMAGE.
*/
#define TC_VERSION_MAJOR "0"
#define TC_VERSION_MINOR "1"
enum
tc_opt_mode
{
TC_OPT_USAGE
,
TC_OPT_VERSION
,
TC_OPT_RPL
,
TC_OPT_WAL_CAT
,
TC_OPT_WAL_PLAY
,
...
...
@@ -47,6 +51,7 @@ struct tc_opt {
};
void
tc_opt_usage
(
void
);
void
tc_opt_version
(
void
);
enum
tc_opt_mode
tc_opt_init
(
struct
tc_opt
*
opt
,
int
argc
,
char
**
argv
);
...
...
This diff is collapsed.
Click to expand it.
doc/man/tarantool.pod
+
19
−
4
View file @
4f73691a
...
...
@@ -12,20 +12,35 @@ tarantool - readline SQL-client for L<tarantool>.
=item -a <host>, --host <host>
Defines
S
erver address.
Defines
s
erver address.
=item -p <port>, --port <port>
Defines server port.
=item -m <port>, --
port-
admin <port>
=item -m <port>, --admin
-port
<port>
Defines Server admin port.
Defines server admin port.
=item -C <file>, --cat <file>
Outputs xlog file content.
=item -P <file>, --play <file>
Replays xlog file to the specified server.
=item -R <lsn>, --rpl <lsn>
Acts as replica for the specified server.
=item -h, --help
Displays helpscreen and exits.
=
back
=
item -v, --version
Displays version and exits.
=back
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment