From owner-svn-src-all@FreeBSD.ORG Tue Apr 15 14:55:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F00FFA5; Tue, 15 Apr 2014 14:55:57 +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 1CB5D156E; Tue, 15 Apr 2014 14:55:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3FEtuPh080199; Tue, 15 Apr 2014 14:55:56 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3FEtulh080198; Tue, 15 Apr 2014 14:55:56 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201404151455.s3FEtulh080198@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 15 Apr 2014 14:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264500 - head/usr.sbin/ctld X-SVN-Group: head 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.17 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: Tue, 15 Apr 2014 14:55:57 -0000 Author: trasz Date: Tue Apr 15 14:55:56 2014 New Revision: 264500 URL: http://svnweb.freebsd.org/changeset/base/264500 Log: Stop treating LUN 0 as mandatory. There is no reason to do that. Suggested by: mav@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Apr 15 14:41:41 2014 (r264499) +++ head/usr.sbin/ctld/ctld.c Tue Apr 15 14:55:56 2014 (r264500) @@ -1099,7 +1099,7 @@ conf_verify(struct conf *conf) struct portal_group *pg; struct target *targ; struct lun *lun; - bool found_lun0; + bool found_lun; int error; if (conf->conf_pidfile_path == NULL) @@ -1116,17 +1116,16 @@ conf_verify(struct conf *conf) "default"); assert(targ->t_portal_group != NULL); } - found_lun0 = false; + found_lun = false; TAILQ_FOREACH(lun, &targ->t_luns, l_next) { error = conf_verify_lun(lun); if (error != 0) return (error); - if (lun->l_lun == 0) - found_lun0 = true; + found_lun = true; } - if (!found_lun0) { - log_warnx("mandatory LUN 0 not configured " - "for target \"%s\"", targ->t_name); + if (!found_lun) { + log_warnx("no LUNs defined for target \"%s\"", + targ->t_name); return (1); } }