Skip to content
Snippets Groups Projects
Commit 74fd07e8 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

knsupdate: allow comments and empty lines in batch file

parent 36735f27
No related branches found
No related tags found
No related merge requests found
......@@ -431,8 +431,9 @@ static int pkt_sendrecv(nsupdate_params_t *params,
static int nsupdate_process_line(char *lp, int len, void *arg)
{
nsupdate_params_t *params = (nsupdate_params_t *)arg;
if (lp[len - 1] == '\n') lp[len - 1] = '\0'; /* Discard nline */
if (lp[0] == '\0' || lp[0] == ';') return KNOT_EOK; /* Empty/comment */
int ret = tok_find(lp, cmd_array);
if (ret < 0) return ret; /* Syntax error */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment