Make iscsictl(8) properly handle (optional) semicolons in iscsi.conf,

instead of ignoring them and echoing them to stdout.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Edward Tomasz Napierala 2014-02-10 15:04:59 +00:00
parent 5d386b72b1
commit 57cf56ce65
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261714
2 changed files with 5 additions and 1 deletions

View File

@ -57,7 +57,7 @@ extern void yyrestart(FILE *);
%token AUTH_METHOD HEADER_DIGEST DATA_DIGEST TARGET_NAME TARGET_ADDRESS
%token INITIATOR_NAME INITIATOR_ADDRESS INITIATOR_ALIAS USER SECRET
%token MUTUAL_USER MUTUAL_SECRET SESSION_TYPE PROTOCOL IGNORED
%token MUTUAL_USER MUTUAL_SECRET SEMICOLON SESSION_TYPE PROTOCOL IGNORED
%token EQUALS OPENING_BRACKET CLOSING_BRACKET
%union
@ -86,6 +86,8 @@ target: STR OPENING_BRACKET target_entries CLOSING_BRACKET
target_entries:
|
target_entries target_entry
|
target_entries target_entry SEMICOLON
;
target_entry:

View File

@ -87,7 +87,9 @@ chapDigest { return IGNORED; }
\{ { return OPENING_BRACKET; }
\} { return CLOSING_BRACKET; }
= { return EQUALS; }
; { return SEMICOLON; }
#.*$ /* ignore comments */;
\n { lineno++; }
[ \t]+ /* ignore whitespace */;
. { yylval.str = strdup(yytext); return STR; }
%%