Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
44efe66e
Commit
44efe66e
authored
Mar 22, 2010
by
antirez
Browse files
Merged gnrfan patches fixing issues 191, 193, 194
parents
7bf90179
723fb69b
Changes
1
Show whitespace changes
Inline
Side-by-side
redis.c
View file @
44efe66e
...
...
@@ -799,6 +799,8 @@ static struct redisCommand cmdTable[] = {
{
NULL
,
NULL
,
0
,
0
,
NULL
,
0
,
0
,
0
}
};
static
void
usage
();
/*============================ Utility functions ============================ */
/* Glob-style pattern matching. */
...
...
@@ -9168,19 +9170,23 @@ static void version() {
exit
(
0
);
}
static
void
usage
()
{
fprintf
(
stderr
,
"Usage: ./redis-server [/path/to/redis.conf]
\n
"
);
exit
(
1
);
}
int
main
(
int
argc
,
char
**
argv
)
{
time_t
start
;
initServerConfig
();
if
(
argc
==
2
)
{
if
(
(
strcmp
(
argv
[
1
],
"-v"
)
==
0
)
||
(
strcmp
(
argv
[
1
],
"--version"
)
==
0
))
{
version
();
}
if
(
strcmp
(
argv
[
1
],
"-v"
)
==
0
||
strcmp
(
argv
[
1
],
"--version"
)
==
0
)
version
();
if
(
strcmp
(
argv
[
1
],
"--help"
)
==
0
)
usage
();
resetServerSaveParams
();
loadServerConfig
(
argv
[
1
]);
}
else
if
(
argc
>
2
)
{
fprintf
(
stderr
,
"Usage: ./redis-server [/path/to/redis.conf]
\n
"
);
exit
(
1
);
}
else
if
((
argc
>
2
))
{
usage
();
}
else
{
redisLog
(
REDIS_WARNING
,
"Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'"
);
}
...
...
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