From owner-svn-src-head@freebsd.org Sat Feb 25 22:11:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58FAFCEDA66; Sat, 25 Feb 2017 22:11:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 19D1FC9C; Sat, 25 Feb 2017 22:11:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1PMBB4N061692; Sat, 25 Feb 2017 22:11:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PMBAQL061688; Sat, 25 Feb 2017 22:11:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201702252211.v1PMBAQL061688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 25 Feb 2017 22:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314283 - in head/sys: cam conf modules/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2017 22:11:12 -0000 Author: imp Date: Sat Feb 25 22:11:10 2017 New Revision: 314283 URL: https://svnweb.freebsd.org/changeset/base/314283 Log: Move inclusion of opt_printf.h around so that we can compile all the SCSI modules outside of a sub-build from the kernel. Differential Revision: https://reviews.freebsd.org/D9653 Sponsored by: Netflix Modified: head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h head/sys/conf/config.mk head/sys/modules/cam/Makefile Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat Feb 25 20:32:37 2017 (r314282) +++ head/sys/cam/cam_xpt.c Sat Feb 25 22:11:10 2017 (r314283) @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#include "opt_printf.h" + #include __FBSDID("$FreeBSD$"); @@ -72,6 +74,15 @@ __FBSDID("$FreeBSD$"); #include "opt_cam.h" +/* Wild guess based on not wanting to grow the stack too much */ +#define XPT_PRINT_MAXLEN 512 +#ifdef PRINTF_BUFR_SIZE +#define XPT_PRINT_LEN PRINTF_BUFR_SIZE +#else +#define XPT_PRINT_LEN 128 +#endif +_Static_assert(XPT_PRINT_LEN <= XPT_PRINT_MAXLEN, "XPT_PRINT_LEN is too large"); + /* * This is the maximum number of high powered commands (e.g. start unit) * that can be outstanding at a particular time. Modified: head/sys/cam/cam_xpt.h ============================================================================== --- head/sys/cam/cam_xpt.h Sat Feb 25 20:32:37 2017 (r314282) +++ head/sys/cam/cam_xpt.h Sat Feb 25 22:11:10 2017 (r314283) @@ -34,7 +34,6 @@ #ifdef _KERNEL #include -#include "opt_printf.h" #endif /* Forward Declarations */ @@ -55,15 +54,6 @@ struct cam_path; #ifdef _KERNEL -/* Wild guess based on not wanting to grow the stack too much */ -#define XPT_PRINT_MAXLEN 512 -#ifdef PRINTF_BUFR_SIZE -#define XPT_PRINT_LEN PRINTF_BUFR_SIZE -#else -#define XPT_PRINT_LEN 128 -#endif -_Static_assert(XPT_PRINT_LEN <= XPT_PRINT_MAXLEN, "XPT_PRINT_LEN is too large"); - /* * Definition of an async handler callback block. These are used to add * SIMs and peripherals to the async callback lists. Modified: head/sys/conf/config.mk ============================================================================== --- head/sys/conf/config.mk Sat Feb 25 20:32:37 2017 (r314282) +++ head/sys/conf/config.mk Sat Feb 25 22:11:10 2017 (r314283) @@ -27,6 +27,8 @@ opt_mrouting.h: echo "#define MROUTING 1" > ${.TARGET} opt_natm.h: echo "#define NATM 1" > ${.TARGET} +opt_printf.h: + echo "#define PRINTF_BUFR_SIZE 128" > ${.TARGET} opt_scsi.h: echo "#define SCSI_DELAY 15000" > ${.TARGET} opt_wlan.h: Modified: head/sys/modules/cam/Makefile ============================================================================== --- head/sys/modules/cam/Makefile Sat Feb 25 20:32:37 2017 (r314282) +++ head/sys/modules/cam/Makefile Sat Feb 25 22:11:10 2017 (r314283) @@ -15,6 +15,7 @@ SRCS+= opt_pt.h SRCS+= opt_sa.h SRCS+= opt_ses.h SRCS+= opt_ddb.h +SRCS+= opt_printf.h SRCS+= device_if.h bus_if.h vnode_if.h SRCS+= cam.c SRCS+= cam_compat.c