diff options
Diffstat (limited to 'usr.bin/iscsictl/parse.y')
-rw-r--r-- | usr.bin/iscsictl/parse.y | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/iscsictl/parse.y b/usr.bin/iscsictl/parse.y index e6343f8..7beb53e 100644 --- a/usr.bin/iscsictl/parse.y +++ b/usr.bin/iscsictl/parse.y @@ -57,8 +57,8 @@ 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 SEMICOLON SESSION_TYPE PROTOCOL IGNORED -%token EQUALS OPENING_BRACKET CLOSING_BRACKET +%token MUTUAL_USER MUTUAL_SECRET SEMICOLON SESSION_TYPE PROTOCOL OFFLOAD +%token IGNORED EQUALS OPENING_BRACKET CLOSING_BRACKET %union { @@ -117,6 +117,8 @@ target_entry: | session_type | + offload + | protocol | ignored @@ -250,6 +252,14 @@ session_type: SESSION_TYPE EQUALS STR } ; +offload: OFFLOAD EQUALS STR + { + if (target->t_offload != NULL) + errx(1, "duplicated offload at line %d", lineno); + target->t_offload = $3; + } + ; + protocol: PROTOCOL EQUALS STR { if (target->t_protocol != PROTOCOL_UNSPECIFIED) |