Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e3ff45d6
Commit
e3ff45d6
authored
Nov 02, 2005
by
reggie@fedora.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more refinement of IM patch to fix Windows pathnames with spaces
parent
27e8da79
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
server-tools/instance-manager/instance_options.cc
server-tools/instance-manager/instance_options.cc
+2
-1
server-tools/instance-manager/parse_output.cc
server-tools/instance-manager/parse_output.cc
+6
-8
No files found.
server-tools/instance-manager/instance_options.cc
View file @
e3ff45d6
...
...
@@ -334,12 +334,13 @@ int Instance_options::complete_initialization(const char *default_path,
uint
instance_type
)
{
const
char
*
tmp
;
char
*
end
;
if
(
!
mysqld_path
&&
!
(
mysqld_path
=
strdup_root
(
&
alloc
,
default_path
)))
goto
err
;
// it's safe to cast this to char* since this is a buffer we are allocating
char
*
end
=
convert_dirname
((
char
*
)
mysqld_path
,
mysqld_path
,
NullS
);
end
=
convert_dirname
((
char
*
)
mysqld_path
,
mysqld_path
,
NullS
);
end
[
-
1
]
=
0
;
mysqld_path_len
=
strlen
(
mysqld_path
);
...
...
server-tools/instance-manager/parse_output.cc
View file @
e3ff45d6
...
...
@@ -26,14 +26,14 @@
void
trim_space
(
const
char
**
text
,
uint
*
word_len
)
{
const
char
*
start
=
*
text
;
const
char
*
start
=
*
text
;
while
(
*
start
!=
0
&&
*
start
==
' '
)
start
++
;
*
text
=
start
;
int
len
=
strlen
(
start
);
const
char
*
end
=
start
+
len
-
1
;
while
(
end
>
start
&&
(
*
end
==
' '
||
*
end
==
'\r'
||
*
end
==
'\n'
))
while
(
end
>
start
&&
my_isspace
(
&
my_charset_latin1
,
*
end
))
end
--
;
*
word_len
=
(
end
-
start
)
+
1
;
}
...
...
@@ -96,16 +96,14 @@ int parse_output_and_get_value(const char *command, const char *word,
linebuf
[
sizeof
(
linebuf
)
-
1
]
=
'\0'
;
/* safety */
/*
Get the word, which might contain non-alphanumeric characters. (Usually
these are '/', '-' and '.' in the path expressions and filenames)
Compare the start of our line with the word(s) we are looking for.
*/
if
(
!
strncmp
(
word
,
linep
,
wordlen
))
{
/*
If we have found the word, return the next one (this is usually
an option value) or the whole line (if flag)
If we have found our word(s), then move linep past the word(s)
*/
linep
+=
wordlen
;
/* swallow the previous one */
linep
+=
wordlen
;
if
(
flag
&
GET_VALUE
)
{
trim_space
((
const
char
**
)
&
linep
,
&
found_word_len
);
...
...
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