cli_dbxml(): Fix handling of mountpoints
The function has code to handle mountpoints, however there is a logic error that prevents that code from ever being run. Fix that.
This commit is contained in:
parent
fcdfbd23cc
commit
2142a4fd96
1 changed files with 4 additions and 7 deletions
|
|
@ -425,14 +425,11 @@ cli_dbxml(clixon_handle h,
|
|||
if (cvec_concat_cb(argv, api_path_fmt_cb) < 0)
|
||||
goto done;
|
||||
api_path_fmt = cbuf_get(api_path_fmt_cb);
|
||||
argc = cvec_len(argv);
|
||||
if (cvec_len(argv) > argc){
|
||||
if (cvec_len(argv) > 0){
|
||||
argc = cvec_len(argv) - 1;
|
||||
cv = cvec_i(argv, argc++);
|
||||
str = cv_string_get(cv);
|
||||
if (strncmp(str, "mtpoint:", strlen("mtpoint:")) != 0){
|
||||
clixon_err(OE_PLUGIN, 0, "mtpoint does not begin with 'mtpoint:'");
|
||||
goto done;
|
||||
}
|
||||
if (str && strncmp(str, "mtpoint:", strlen("mtpoint:")) == 0)
|
||||
mtpoint = str + strlen("mtpoint:");
|
||||
}
|
||||
/* Remove all keywords */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue