From owner-svn-src-all@FreeBSD.ORG Sat Nov 29 15:36:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14A99385; Sat, 29 Nov 2014 15:36:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB1273E7; Sat, 29 Nov 2014 15:36:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sATFaBSL052297; Sat, 29 Nov 2014 15:36:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sATFaBqX052293; Sat, 29 Nov 2014 15:36:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201411291536.sATFaBqX052293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 29 Nov 2014 15:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275246 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 15:36:12 -0000 Author: trasz Date: Sat Nov 29 15:36:10 2014 New Revision: 275246 URL: https://svnweb.freebsd.org/changeset/base/275246 Log: MFC r273820: Make it possible to optionally use semicolon to separate statements. This makes it possible to format stuff like this: target xxx { lun 0 { path /foo/bar; size 4G; } } Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctld/parse.y stable/10/usr.sbin/ctld/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Sat Nov 29 15:34:17 2014 (r275245) +++ stable/10/usr.sbin/ctld/parse.y Sat Nov 29 15:36:10 2014 (r275246) @@ -60,7 +60,7 @@ extern void yyrestart(FILE *); %token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL %token CLOSING_BRACKET DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP DISCOVERY_FILTER %token INITIATOR_NAME INITIATOR_PORTAL LISTEN LISTEN_ISER LUN MAXPROC -%token OPENING_BRACKET OPTION PATH PIDFILE PORTAL_GROUP SERIAL SIZE STR +%token OPENING_BRACKET OPTION PATH PIDFILE PORTAL_GROUP SEMICOLON SERIAL SIZE STR %token TARGET TIMEOUT ISNS_SERVER ISNS_PERIOD ISNS_TIMEOUT %union @@ -75,6 +75,8 @@ extern void yyrestart(FILE *); statements: | statements statement + | + statements statement SEMICOLON ; statement: @@ -220,6 +222,8 @@ auth_group_name: STR auth_group_entries: | auth_group_entries auth_group_entry + | + auth_group_entries auth_group_entry SEMICOLON ; auth_group_entry: @@ -322,6 +326,8 @@ portal_group_name: STR portal_group_entries: | portal_group_entries portal_group_entry + | + portal_group_entries portal_group_entry SEMICOLON ; portal_group_entry: @@ -406,6 +412,8 @@ target_name: STR target_entries: | target_entries target_entry + | + target_entries target_entry SEMICOLON ; target_entry: @@ -653,6 +661,8 @@ lun_number: STR lun_entries: | lun_entries lun_entry + | + lun_entries lun_entry SEMICOLON ; lun_entry: Modified: stable/10/usr.sbin/ctld/token.l ============================================================================== --- stable/10/usr.sbin/ctld/token.l Sat Nov 29 15:34:17 2014 (r275245) +++ stable/10/usr.sbin/ctld/token.l Sat Nov 29 15:36:10 2014 (r275246) @@ -83,6 +83,7 @@ timeout { return TIMEOUT; } \} { return CLOSING_BRACKET; } #.*$ /* ignore comments */; \n { lineno++; } +; { return SEMICOLON; } [ \t]+ /* ignore whitespace */; . { yylval.str = strdup(yytext); return STR; } %%