Date: Sat, 25 Feb 2017 22:11:10 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> 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 Message-ID: <201702252211.v1PMBAQL061688@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> __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 <sys/cdefs.h> -#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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702252211.v1PMBAQL061688>