From owner-svn-src-projects@FreeBSD.ORG Sun Mar 15 11:58:59 2015 Return-Path: Delivered-To: svn-src-projects@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 97ACAE31; Sun, 15 Mar 2015 11:58:59 +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 7ED50808; Sun, 15 Mar 2015 11:58:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FBwxX5009341; Sun, 15 Mar 2015 11:58:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FBwrtp009310; Sun, 15 Mar 2015 11:58:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503151158.t2FBwrtp009310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 15 Mar 2015 11:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r280030 - in projects/clang360-import: contrib/mdocml sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/iscsi_initiator sys/dev/usb/net sys/kern sys/mips/nlm sys/mips/rmi sys/mips/... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Mar 2015 11:58:59 -0000 Author: dim Date: Sun Mar 15 11:58:52 2015 New Revision: 280030 URL: https://svnweb.freebsd.org/changeset/base/280030 Log: Merge ^/head r279995 through r280029. Deleted: projects/clang360-import/contrib/mdocml/Makefile.local Modified: projects/clang360-import/contrib/mdocml/INSTALL projects/clang360-import/contrib/mdocml/Makefile projects/clang360-import/contrib/mdocml/NEWS projects/clang360-import/contrib/mdocml/TODO projects/clang360-import/contrib/mdocml/config.h projects/clang360-import/contrib/mdocml/configure projects/clang360-import/contrib/mdocml/eqn.7 projects/clang360-import/contrib/mdocml/eqn.c projects/clang360-import/contrib/mdocml/main.c projects/clang360-import/contrib/mdocml/man_html.c projects/clang360-import/contrib/mdocml/man_term.c projects/clang360-import/contrib/mdocml/mandocdb.c projects/clang360-import/contrib/mdocml/mansearch.c projects/clang360-import/contrib/mdocml/mdoc_html.c projects/clang360-import/contrib/mdocml/mdoc_term.c projects/clang360-import/contrib/mdocml/preconv.c projects/clang360-import/contrib/mdocml/read.c projects/clang360-import/contrib/mdocml/tbl_term.c projects/clang360-import/contrib/mdocml/term.c projects/clang360-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c projects/clang360-import/sys/dev/iscsi_initiator/isc_sm.c projects/clang360-import/sys/dev/usb/net/usb_ethernet.c projects/clang360-import/sys/kern/kern_cons.c projects/clang360-import/sys/kern/kern_et.c projects/clang360-import/sys/kern/kern_fail.c projects/clang360-import/sys/kern/kern_tc.c projects/clang360-import/sys/kern/sched_ule.c projects/clang360-import/sys/kern/subr_bus.c projects/clang360-import/sys/kern/subr_param.c projects/clang360-import/sys/kern/subr_prf.c projects/clang360-import/sys/mips/nlm/cms.c projects/clang360-import/sys/mips/rmi/dev/iic/at24co2n.c projects/clang360-import/sys/mips/rmi/fmn.c projects/clang360-import/sys/net80211/ieee80211_freebsd.c projects/clang360-import/sys/netinet/tcp_hostcache.c projects/clang360-import/sys/sys/sysctl.h projects/clang360-import/sys/xen/xenbus/xenbusb.c projects/clang360-import/usr.sbin/bhyve/block_if.c projects/clang360-import/usr.sbin/bhyve/pci_ahci.c projects/clang360-import/usr.sbin/bhyve/pci_virtio_block.c projects/clang360-import/usr.sbin/bhyve/pci_virtio_net.c projects/clang360-import/usr.sbin/bhyve/pci_virtio_rnd.c projects/clang360-import/usr.sbin/bhyve/virtio.c projects/clang360-import/usr.sbin/bhyve/virtio.h Directory Properties: projects/clang360-import/ (props changed) projects/clang360-import/contrib/mdocml/ (props changed) projects/clang360-import/sys/ (props changed) projects/clang360-import/sys/cddl/contrib/opensolaris/ (props changed) projects/clang360-import/usr.sbin/bhyve/ (props changed) Modified: projects/clang360-import/contrib/mdocml/INSTALL ============================================================================== --- projects/clang360-import/contrib/mdocml/INSTALL Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/INSTALL Sun Mar 15 11:58:52 2015 (r280030) @@ -1,18 +1,13 @@ -$Id: INSTALL,v 1.9 2014/12/11 07:44:46 schwarze Exp $ +$Id: INSTALL,v 1.10 2015/03/09 21:00:14 schwarze Exp $ About mdocml, the portable mandoc distribution ---------------------------------------------- The mandoc manpage compiler toolset is a suite of tools compiling mdoc(7), the roff(7) macro language of choice for BSD manual pages, and man(7), the predominant historical language for UNIX manuals. -Since the present version 1.13.2, it includes a man(1) manual viewer -in addition to the apropos(1) manual page search tool. +It includes a man(1) manual viewer and additional tools. For general information, see . -In this document, we describe the installation and deployment of -mandoc(1), first as a simple, standalone formatter, and then as part of -the man(1) system. - In case you have questions or want to provide feedback, read . Consider subscribing to the discuss@ mailing list mentioned on that page. If you intend to @@ -21,7 +16,7 @@ tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, December 2014 +Ingo Schwarze, Karlsruhe, March 2015 Installation @@ -32,10 +27,6 @@ or available via a binary package or a p latest bundled and ported versions of mandoc for various operating systems is maintained at . -If mandoc is installed, you can check the version by running "mandoc -V". -You can find the version contained in this distribution tarball -by running "./configure". - Regarding how packages and ports are maintained for your operating system, please consult your operating system documentation. To install mandoc manually, the following steps are needed: @@ -66,17 +57,34 @@ package using some kind of fake root mec command like "make DESTDIR=... install". Read the *-install targets in the "Makefile" to understand how DESTDIR is used. -6. To set up a man.cgi(8) server, read its manual page. - -7. To use mandoc(1) as your man(1) formatter, read the "Deployment" -sections below. +6. If you want to use the integrated man(1) and your system uses +manpath(1), make sure it is configured correctly, in particular, +it returns all directory trees where manual pages are installed. +Otherwise, if your system uses man.conf(5), make sure it contains +a "_whatdb" line for each directory tree, and the order of these +lines meets your wishes. + +7. If you compiled with database support, run the command "sudo +makewhatis" to build mandoc.db(5) databases in all the directory +trees configured in step 6. Whenever installing new manual pages, +re-run makewhatis(8) to update the databases, or apropos(1) will +not find the new pages. + +8. To set up a man.cgi(8) server, read its manual page. + +Note that some man(7) pages may contain low-level roff(7) markup +that mandoc does not yet understand. On some BSD systems using +mandoc, third-party software is vetted on whether it may be formatted +with mandoc. If not, groff(1) is pulled in as a dependency and +used to install a pre-formatted "catpage" instead of directly as +manual page source. Understanding mandoc dependencies --------------------------------- -The mandoc(1) and demandoc(1) utilities have no external dependencies. -However, makewhatis(8), apropos(1), and man(1) depend on the following -software: +The mandoc(1), man(1), and demandoc(1) utilities have no external +dependencies, but makewhatis(8) and apropos(1) depend on the +following software: 1. The SQLite database system, see . The recommended version of SQLite is 3.8.4.3 or newer. The mandoc @@ -142,76 +150,3 @@ for unexpected failures. Those are most or libraries are installed in unusual places or interfaces defined in unusual headers. You can also look at the file "config.h" and check that no "#define HAVE_*" differ from your expectations. - - -Deployment using the integrated man(1) viewer ---------------------------------------------- -This mode of deployment requires database support. In case of -doubt, look at the section "user settings related to database -support" in the file configure.local.example. - -Deployment requires the following steps: - -1. Build and install mandoc as described above in steps 2 to 5 -below "Installation". - -2. If your system uses manpath(1), make sure it is configured -correctly, in particular, it returns all directory trees where -manual pages are installed. If your system uses man.conf(5), make -sure it contains a "_whatdb" line for each directory tree, and the -order of these lines meets your wishes. - -3. Run the command "sudo makewhatis" to build mandoc.db(5) databases -in all the directory trees configured in step 2. - -At this point, your new man(1), apropos(1), and whatis(1) should work. -Otherwise, please look at , both -for help and to have these instructions improved. - -Whenever installing new manual pages, re-run makewhatis(8) to update -the databases, or man(1) will not find the new pages. - - -Deployment using your system's native man(1) viewer ---------------------------------------------------- -This mode of deployment does not require database support, -so it works even if you don't have SQLite3. - -Usually, you can have your default installation and mandoc(1) work right -alongside each other by using user-specific versions of the files -mentioned below. - -0. Back up each file you want to change! - -1. First see whether your system has "/etc/man.conf" or "/etc/manpath.conf" -(if it has neither, but man(1) is functional, then let us know) or, -if running as your own user, a per-user override file. In either -case, find where man(1) is executing nroff(1) or groff(1) to format -manuals. Replace these calls with mandoc(1). - -2. Then make sure that man(1) isn't running preprocessors, so you may -need to replace tbl(1), eqn(1), and similar references with cat(1). -Some man(1) implementations, like that on Mac OSX, let you run "man -d" -to see how the formatter is invoked. Use this to test your changes. On -Mac OS X, for instance, man(1) will prepend all files with ".ll" and -".nr" to set the terminal size, so you need to pass "tail -n+2 | -mandoc(1)" to disregard them. - -3. Finally, make sure that mandoc(1) is actually being invoked instead -of cached pages being pulled up. You can usually do this by commenting -out NOCACHE or similar. - - -mandoc(1) still has a long way to go in understanding non-trivial -low-level roff(7) markup embedded in some man(7) pages. On the BSD -systems using mandoc(1), third-party software is generally vetted -on whether it may be formatted with mandoc(1). If not, groff(1) -is pulled in as a dependency and used to install a pre-formatted -"catpage" instead of directly as manual page source. - -For more background on switching operating systems to use mandoc(1) -instead of groff(1) to format manuals, see the BSDCan and EuroBSDCon -presentations by Ingo Schwarze: - - - Modified: projects/clang360-import/contrib/mdocml/Makefile ============================================================================== --- projects/clang360-import/contrib/mdocml/Makefile Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/Makefile Sun Mar 15 11:58:52 2015 (r280030) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.456 2015/02/16 16:23:54 schwarze Exp $ +# $Id: Makefile,v 1.457 2015/03/13 12:35:32 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons -# Copyright (c) 2011, 2013, 2014 Ingo Schwarze +# Copyright (c) 2011, 2013, 2014, 2015 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -15,7 +15,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.13.2 +VERSION = 1.13.3 # === LIST OF FILES ==================================================== Modified: projects/clang360-import/contrib/mdocml/NEWS ============================================================================== --- projects/clang360-import/contrib/mdocml/NEWS Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/NEWS Sun Mar 15 11:58:52 2015 (r280030) @@ -1,7 +1,122 @@ -$Id: NEWS,v 1.8 2014/12/13 13:43:47 schwarze Exp $ +$Id: NEWS,v 1.9 2015/03/13 12:35:32 schwarze Exp $ This file lists the most important changes in the mdocml.bsd.lv distribution. +Changes in version 1.13.3, released on March 13, 2015 + + --- MAJOR NEW FEATURES --- + * When a manual is missing from an outdated database, let man(1) + show it anyway, using a KISS file system lookup as a fallback. + * Use this to always provide man(1), even without database support. + * Fatal errors no longer exist. If a file can be opened, mandoc + will produce some output; at worst, the output may be almost empty. + * New -Wunsupp message level. + --- POTENTIONALLY SECURITY RELEVANT BUGFIXES --- + * Fix a potential write buffer overrun on incomplete string conditionals. + http://mdocml.bsd.lv/cgi-bin/cvsweb/roff.c#rev1.241 + * Fix a potential write buffer overrun on backslash at EOF in a conditional. + http://mdocml.bsd.lv/cgi-bin/cvsweb/roff.c#rev1.247 + * Fix a use after free sometimes hit when validation deletes a block. + http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_macro.c#rev1.180 + --- MAJOR FUNCTIONALLY RELEVANT BUGFIXES --- + * Let man(1) show manuals for the current architecture by default, + and support the MACHINE environment variable. + * Fix the man(1) and apropos(1) -m option, it didn't work at all. + * Do not spawn a pager when there is no output. + * In makewhatis(8), fix detection of hardlinked manuals on platforms + having padding in struct inodev (typically 64bit platforms). + --- PORTABILITY IMPROVEMENTS --- + * Ignore O_CLOEXEC when the operating system doesn't provide it. + * Avoid forward reference to enum type which violates ISO C99. + * Support homebrew-style linking on Mac OS X. + --- MINOR NEW FEATURES --- + * lookup: Accept digit+letter and "n" as section names in man(1), + and consistently handle digit+letter in file name extensions. + * lookup: Speed up -s/-S by using the "mlinks" rather than the "keys" table. + * output: Insert horizontal lines between formatted manual pages. + * input: New stricter and more resilient UTF-8 parser. + * mdoc(7): Refactor block rewinding for simpler and more robust parsing. + * man(7): Use the -Ios option when .TH has less than four arguments. + * tbl(7): Implement the "center" option. + * tbl(7): New option and format parsers, improved in many respects. + * roff(7): Basic implementation of the \o escape sequence (overstrike), + and improved rendering of overstrikes in PostScript and PDF output. + * Message improvements, in particular for, but not restricted to, + eqn(7), tbl(7), and wrong numbers of arguments in mdoc(7) and man(7), + in various cases also improving output generated by invalid input. + * Delete the -V option. It serves no purpose but keeps confusing people. + * gmdiff: Minimal support for Heirloom roff. + --- RELIABILITY BUGFIXES --- + * tbl(7): Fix a read buffer overrun on 'f' at EOL in a layout. + * roff(7): Fix a read buffer overrun on incomplete numerical conditions. + * mdoc(7): Fix a NULL pointer access on .Nd followed by an explicit block. + * mdoc(7): Fix a NULL pointer access on .It Xo without .Xc. + * mdoc(7): Fix a NULL pointer access on .Eo without a tail. + * mdoc(7): Fix a NULL pointer access in the validation of empty .St macros. + * man(7)/tbl(7): Fix a NULL pointer access on .TS right after .TP. + * tbl(7): Fix a NULL pointer access on layout lines without any cells. + * eqn(7): Fix NULL pointer accesses in the terminal formatter. + * roff(7): Fix a NULL pointer access on trailing \s-/\s+ without an argument. + * gz: Fix a potential NULL pointer access after waitpid() failure. + * roff(7): Don't let the modulo operator divide by zero. + * input: Fix an assertion failure on certain invalid UTF-8 input. + * terminal output: Allow arbitrary depth of the font stack (assertion fix). + * mdoc(7): Fix assertion failures and endless loops on invalid block closing. + * mdoc(7): Fix an assertion failure on .Bl .Sm not followed by .It. + * mdoc(7): Fix an assertion failure on .Bl -column ... .El .Ta. + * tbl(7): Fix assertion failures by macros inside table data, + but do not throw away the macro arguments. + * Prevent certain kinds of unreasonable input from producing excessive + output, in one case caused by unsigned integer underflow. + * Fix a potential memory leak in makewhatis(8) on very long filenames. + --- MINOR BUGFIXES --- + * mdoc(7): Fix parsing of badly nested blocks with multiple identical blocks. + * mdoc(7): Support negative indentations for displays and lists. + * mdoc(7): Don't mistreat negative .sp arguments as large positive ones. + * mdoc(7): Some spacing fixes for .Eo/.Ec. + * man(7): Support negative horizontal widths. + * man(7): Do not print out invalid .IP arguments. + * man(7): Correctly handle scaling units after .PD. + * man(7): Support .RE with an argument. + * man(7): Fix restoring indentation after .RS with large negative arguments. + * tbl(7): Prevent tables from breaking the filling of preceding text. + * tbl(7): Fix vertical spacing at the beginning of tables. + * tbl(7): Parser and formatter fixes for line drawing and font modifiers. + * tbl(7): Correct handling of blank data lines. + * eqn(7): Add sometimes missing whitespace before equation output. + * roff(7): Fix vertical scaling, most of it was wrong. + * roff(7): Slightly improve \w width measurements. + * roff(7): Accept the historic aliases \s10 to \s39 for \s(10 to \s(39. + * roff(7): Correctly escape quotes when expanding macro arguments. + * roff(7): Correctly handle scaling units in numerical expressions, + and some other improvements to the parsing of numerical expressions. + * roff(7): Three minor fixes with respect to evaluation of conditionals. + * roff(7): Let .it accept numerical expressions, not just constants. + * mandoc_char(7): Correct some character names and renderings. + * If earlier files set a non-zero exit status, never reset it to zero. + --- THANKS TO --- + * Jonathan Gray (OpenBSD) for yet more testing with afl (the American + Fuzzy Lop security fuzzer), again resulting in many bug reports. + * Theo de Raadt (OpenBSD) for suggesting the main new feature (man(1) file + system lookup) and for reporting an important bug (pager without output). + * Theo Buehler for an important bug report (-s/-S slowness) + and for proposing a nice new feature (lines between pages). + * Jason McIntyre for an important bug report (hardlink detection) + and multiple documentation patches. + * Pascal Stumpf (OpenBSD) and Alessandro de Laurenzis for + important bug reports (architecture and man -m, respectively). + * Thomas Klausner (NetBSD) for proposing a new feature (man(7) -Ios), + a bug report, and release testing. + * Anthony Bentley, Daniel Dickman, Ted Unangst (OpenBSD) and + Kristaps Dzonsons (bsd.lv) for source code patches and bug reports. + * Christian Weisgerber (OpenBSD) for more than half a dozen bug reports. + * Carsten Kunze (Heirloom troff) for bug reports and release testing. + * Antoine Jacoutot (OpenBSD) for release testing. + * Alexis Hildebrandt (Homebrew), Baptiste Daroussin (FreeBSD), + Jonathan Perkin (SmartOS), Pedro Giffuni (FreeBSD), Svyatoslav + Mishyn (Crux Linux), Ulrich Spoerlein (FreeBSD), Jan Stary, Patrick + Keshishian, Sebastien Marie, and Steffen Nurpmeso for bug reports. + Changes in version 1.13.2, released on December 13, 2014 --- MAJOR NEW FEATURES --- Modified: projects/clang360-import/contrib/mdocml/TODO ============================================================================== --- projects/clang360-import/contrib/mdocml/TODO Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/TODO Sun Mar 15 11:58:52 2015 (r280030) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.201 2015/02/20 13:47:28 schwarze Exp $ +* $Id: TODO,v 1.202 2015/03/11 13:11:22 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -557,6 +557,11 @@ Several areas can be cleaned up to make * structural issues ************************************************************************ +- Improve -O suboption parsing. Do it in the main program such that + errors can be reported. Pay attention to distinguishing the + mandoc(1) and apropos(1) styles of both options. + loc ** exist * algo ** size ** imp *** + - Use libz directly instead of forking gunzip(1). Suggested by bapt at FreeBSD among others. Modified: projects/clang360-import/contrib/mdocml/config.h ============================================================================== --- projects/clang360-import/contrib/mdocml/config.h Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/config.h Sun Mar 15 11:58:52 2015 (r280030) @@ -7,7 +7,6 @@ #include -#define VERSION "1.13.2" #define HAVE_DIRENT_NAMLEN 1 #define HAVE_FGETLN 1 #define HAVE_FTS 1 Modified: projects/clang360-import/contrib/mdocml/configure ============================================================================== --- projects/clang360-import/contrib/mdocml/configure Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/configure Sun Mar 15 11:58:52 2015 (r280030) @@ -237,9 +237,7 @@ elif [ -z "${DBLIB}" ]; then fi # --- manpath --- -if [ ${BUILD_DB} -eq 0 ]; then - HAVE_MANPATH=0 -elif ismanual manpath "${HAVE_MANPATH}"; then +if ismanual manpath "${HAVE_MANPATH}"; then : elif manpath 1>&3 2>&3; then echo "manpath: yes" 1>&2 Modified: projects/clang360-import/contrib/mdocml/eqn.7 ============================================================================== --- projects/clang360-import/contrib/mdocml/eqn.7 Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/eqn.7 Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -.\" $Id: eqn.7,v 1.33 2015/01/29 00:33:57 schwarze Exp $ +.\" $Id: eqn.7,v 1.34 2015/03/09 20:17:23 schwarze Exp $ .\" .\" Copyright (c) 2011 Kristaps Dzonsons .\" Copyright (c) 2014 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 29 2015 $ +.Dd $Mdocdate: March 9 2015 $ .Dt EQN 7 .Os .Sh NAME @@ -72,31 +72,31 @@ case-sensitive literals in the input: .Bd -literal -offset indent eqn : box | eqn box box : text - | \*q{\*q eqn \*q}\*q - | \*qdefine\*q text text - | \*qndefine\*q text text - | \*qtdefine\*q text text - | \*qgfont\*q text - | \*qgsize\*q text - | \*qset\*q text text - | \*qundef\*q text - | \*qsqrt\*q box + | \(dq{\(dq eqn \(dq}\(dq + | \(dqdefine\(dq text text + | \(dqndefine\(dq text text + | \(dqtdefine\(dq text text + | \(dqgfont\(dq text + | \(dqgsize\(dq text + | \(dqset\(dq text text + | \(dqundef\(dq text + | \(dqsqrt\(dq box | box pos box | box mark - | \*qmatrix\*q \*q{\*q [col \*q{\*q list \*q}\*q ]* - | pile \*q{\*q list \*q}\*q + | \(dqmatrix\(dq \(dq{\(dq [col \(dq{\(dq list \(dq}\(dq ]* + | pile \(dq{\(dq list \(dq}\(dq | font box - | \*qsize\*q text box - | \*qleft\*q text eqn [\*qright\*q text] -col : \*qlcol\*q | \*qrcol\*q | \*qccol\*q | \*qcol\*q -text : [^space\e\*q]+ | \e\*q.*\e\*q -pile : \*qlpile\*q | \*qcpile\*q | \*qrpile\*q | \*qpile\*q -pos : \*qover\*q | \*qsup\*q | \*qsub\*q | \*qto\*q | \*qfrom\*q -mark : \*qdot\*q | \*qdotdot\*q | \*qhat\*q | \*qtilde\*q | \*qvec\*q - | \*qdyad\*q | \*qbar\*q | \*qunder\*q -font : \*qroman\*q | \*qitalic\*q | \*qbold\*q | \*qfat\*q + | \(dqsize\(dq text box + | \(dqleft\(dq text eqn [\(dqright\(dq text] +col : \(dqlcol\(dq | \(dqrcol\(dq | \(dqccol\(dq | \(dqcol\(dq +text : [^space\e\(dq]+ | \e\(dq.*\e\(dq +pile : \(dqlpile\(dq | \(dqcpile\(dq | \(dqrpile\(dq | \(dqpile\(dq +pos : \(dqover\(dq | \(dqsup\(dq | \(dqsub\(dq | \(dqto\(dq | \(dqfrom\(dq +mark : \(dqdot\(dq | \(dqdotdot\(dq | \(dqhat\(dq | \(dqtilde\(dq | \(dqvec\(dq + | \(dqdyad\(dq | \(dqbar\(dq | \(dqunder\(dq +font : \(dqroman\(dq | \(dqitalic\(dq | \(dqbold\(dq | \(dqfat\(dq list : eqn - | list \*qabove\*q eqn + | list \(dqabove\(dq eqn space : [\e^~ \et] .Ed .Pp @@ -434,7 +434,7 @@ implementation (including GNU troff). .Bl -dash -compact .It The text string -.Sq \e\*q +.Sq \e\(dq is interpreted as a literal quote in troff. In mandoc, this is interpreted as a comment. .It Modified: projects/clang360-import/contrib/mdocml/eqn.c ============================================================================== --- projects/clang360-import/contrib/mdocml/eqn.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/eqn.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: eqn.c,v 1.57 2015/01/28 21:11:53 schwarze Exp $ */ +/* $Id: eqn.c,v 1.58 2015/03/04 12:19:49 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -194,6 +194,7 @@ enum eqn_symt { EQNSYM_equiv, EQNSYM_lessequal, EQNSYM_moreequal, + EQNSYM_minus, EQNSYM__MAX }; @@ -249,7 +250,7 @@ static const struct eqnsym eqnsyms[EQNSY { "cdot", "pc" }, /* EQNSYM_cdot */ { "nothing", "&" }, /* EQNSYM_nothing */ { "approx", "~~" }, /* EQNSYM_approx */ - { "prime", "aq" }, /* EQNSYM_prime */ + { "prime", "fm" }, /* EQNSYM_prime */ { "half", "12" }, /* EQNSYM_half */ { "partial", "pd" }, /* EQNSYM_partial */ { "inf", "if" }, /* EQNSYM_inf */ @@ -262,6 +263,7 @@ static const struct eqnsym eqnsyms[EQNSY { "==", "==" }, /* EQNSYM_equiv */ { "<=", "<=" }, /* EQNSYM_lessequal */ { ">=", ">=" }, /* EQNSYM_moreequal */ + { "-", "mi" }, /* EQNSYM_minus */ }; static struct eqn_box *eqn_box_alloc(struct eqn_node *, struct eqn_box *); Modified: projects/clang360-import/contrib/mdocml/main.c ============================================================================== --- projects/clang360-import/contrib/mdocml/main.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/main.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.222 2015/02/27 16:02:10 schwarze Exp $ */ +/* $Id: main.c,v 1.225 2015/03/10 13:50:03 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze @@ -20,6 +20,7 @@ #include #include /* MACHINE */ +#include #include #include @@ -101,7 +102,7 @@ static void mmsg(enum mandocerr, enum static void parse(struct curparse *, int, const char *, enum mandoclevel *); static enum mandoclevel passthrough(const char *, int, int); -static void spawn_pager(void); +static pid_t spawn_pager(void); static int toptions(struct curparse *, char *); static void usage(enum argmode) __attribute__((noreturn)); static int woptions(struct curparse *, char *); @@ -130,9 +131,9 @@ main(int argc, char *argv[]) enum outmode outmode; int fd; int show_usage; - int use_pager; int options; int c; + pid_t pager_pid; /* 0: don't use; 1: not yet spawned. */ if (argc < 1) progname = "mandoc"; @@ -174,7 +175,7 @@ main(int argc, char *argv[]) options = MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1; defos = NULL; - use_pager = 1; + pager_pid = 1; show_usage = 0; synopsis_only = 0; outmode = OUTMODE_DEF; @@ -189,7 +190,7 @@ main(int argc, char *argv[]) conf_file = optarg; break; case 'c': - use_pager = 0; + pager_pid = 0; break; case 'f': search.argmode = ARG_WORD; @@ -197,7 +198,7 @@ main(int argc, char *argv[]) case 'h': (void)strlcat(curp.outopts, "synopsis,", BUFSIZ); synopsis_only = 1; - use_pager = 0; + pager_pid = 0; outmode = OUTMODE_ALL; break; case 'I': @@ -272,7 +273,7 @@ main(int argc, char *argv[]) switch (search.argmode) { case ARG_FILE: outmode = OUTMODE_ALL; - use_pager = 0; + pager_pid = 0; break; case ARG_NAME: outmode = OUTMODE_ONE; @@ -303,18 +304,20 @@ main(int argc, char *argv[]) argc = 1; } } else if (argc > 1 && - ((uc = argv[0]) != NULL) && + ((uc = (unsigned char *)argv[0]) != NULL) && ((isdigit(uc[0]) && (uc[1] == '\0' || (isalpha(uc[1]) && uc[2] == '\0'))) || (uc[0] == 'n' && uc[1] == '\0'))) { - search.sec = uc; + search.sec = (char *)uc; argv++; argc--; } if (search.arch == NULL) search.arch = getenv("MACHINE"); +#ifdef MACHINE if (search.arch == NULL) search.arch = MACHINE; +#endif } rc = MANDOCLEVEL_OK; @@ -415,8 +418,8 @@ main(int argc, char *argv[]) mparse_keep(curp.mp); if (argc < 1) { - if (use_pager && isatty(STDOUT_FILENO)) - spawn_pager(); + if (pager_pid == 1 && isatty(STDOUT_FILENO)) + pager_pid = spawn_pager(); parse(&curp, STDIN_FILENO, "", &rc); } @@ -427,9 +430,8 @@ main(int argc, char *argv[]) rc = rctmp; if (fd != -1) { - if (use_pager && isatty(STDOUT_FILENO)) - spawn_pager(); - use_pager = 0; + if (pager_pid == 1 && isatty(STDOUT_FILENO)) + pager_pid = spawn_pager(); if (resp == NULL) parse(&curp, fd, *argv, &rc); @@ -479,6 +481,17 @@ out: free(defos); + /* + * If a pager is attached, flush the pipe leading to it + * and signal end of file such that the user can browse + * to the end. Then wait for the user to close the pager. + */ + + if (pager_pid != 0 && pager_pid != 1) { + fclose(stdout); + waitpid(pager_pid, NULL, 0); + } + return((int)rc); } @@ -927,7 +940,7 @@ mmsg(enum mandocerr t, enum mandoclevel fputc('\n', stderr); } -static void +static pid_t spawn_pager(void) { #define MAX_PAGER_ARGS 16 @@ -936,31 +949,33 @@ spawn_pager(void) char *cp; int fildes[2]; int argc; + pid_t pager_pid; if (pipe(fildes) == -1) { fprintf(stderr, "%s: pipe: %s\n", progname, strerror(errno)); - return; + return(0); } - switch (fork()) { + switch (pager_pid = fork()) { case -1: fprintf(stderr, "%s: fork: %s\n", progname, strerror(errno)); exit((int)MANDOCLEVEL_SYSERR); case 0: + break; + default: close(fildes[0]); if (dup2(fildes[1], STDOUT_FILENO) == -1) { fprintf(stderr, "%s: dup output: %s\n", progname, strerror(errno)); exit((int)MANDOCLEVEL_SYSERR); } - return; - default: - break; + close(fildes[1]); + return(pager_pid); } - /* The original process becomes the pager. */ + /* The child process becomes the pager. */ close(fildes[1]); if (dup2(fildes[0], STDIN_FILENO) == -1) { @@ -968,6 +983,7 @@ spawn_pager(void) progname, strerror(errno)); exit((int)MANDOCLEVEL_SYSERR); } + close(fildes[0]); pager = getenv("MANPAGER"); if (pager == NULL || *pager == '\0') Modified: projects/clang360-import/contrib/mdocml/man_html.c ============================================================================== --- projects/clang360-import/contrib/mdocml/man_html.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/man_html.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.111 2015/02/10 08:05:30 schwarze Exp $ */ +/* $Id: man_html.c,v 1.112 2015/03/03 21:11:34 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015 Ingo Schwarze @@ -223,6 +223,8 @@ print_man_node(MAN_ARGS) print_text(h, n->string); return; case MAN_EQN: + if (n->flags & MAN_LINE) + putchar('\n'); print_eqn(h, n->eqn); break; case MAN_TBL: Modified: projects/clang360-import/contrib/mdocml/man_term.c ============================================================================== --- projects/clang360-import/contrib/mdocml/man_term.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/man_term.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.168 2015/01/30 22:04:44 schwarze Exp $ */ +/* $Id: man_term.c,v 1.169 2015/03/06 15:48:52 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -945,12 +945,8 @@ print_man_node(DECL_ARGS) p->flags |= TERMP_NOSPACE; return; case MAN_TBL: - /* - * Tables are preceded by a newline. Then process a - * table line, which will cause line termination, - */ - if (n->span->prev == NULL) - term_newln(p); + if (p->tbl.cols == NULL) + term_vspace(p); term_tbl(p, n->span); return; default: Modified: projects/clang360-import/contrib/mdocml/mandocdb.c ============================================================================== --- projects/clang360-import/contrib/mdocml/mandocdb.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/mandocdb.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.185 2015/02/27 16:22:09 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.186 2015/03/13 00:19:41 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -942,6 +942,7 @@ mlink_add(struct mlink *mlink, const str assert(NULL == ohash_find(&mlinks, slot)); ohash_insert(&mlinks, slot, mlink); + memset(&inodev, 0, sizeof(inodev)); /* Clear padding. */ inodev.st_ino = st->st_ino; inodev.st_dev = st->st_dev; slot = ohash_lookup_memory(&mpages, (char *)&inodev, Modified: projects/clang360-import/contrib/mdocml/mansearch.c ============================================================================== --- projects/clang360-import/contrib/mdocml/mansearch.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/mansearch.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: mansearch.c,v 1.54 2015/02/27 16:02:10 schwarze Exp $ */ +/* $Id: mansearch.c,v 1.55 2015/03/11 13:11:22 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015 Ingo Schwarze @@ -195,8 +195,8 @@ mansearch(const struct mansearch *search if (NULL == (e = exprcomp(search, argc, argv))) goto out; - outbit = 0; if (NULL != search->outkey) { + outbit = TYPE_Nd; for (indexbit = 0, iterbit = 1; indexbit < mansearch_keymax; indexbit++, iterbit <<= 1) { @@ -206,7 +206,8 @@ mansearch(const struct mansearch *search break; } } - } + } else + outbit = 0; /* * Save a descriptor to the current working directory. Modified: projects/clang360-import/contrib/mdocml/mdoc_html.c ============================================================================== --- projects/clang360-import/contrib/mdocml/mdoc_html.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/mdoc_html.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.225 2015/02/12 12:24:33 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.226 2015/03/03 21:11:34 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -411,6 +411,8 @@ print_mdoc_node(MDOC_ARGS) h->flags |= HTML_NOSPACE; return; case MDOC_EQN: + if (n->flags & MDOC_LINE) + putchar('\n'); print_eqn(h, n->eqn); break; case MDOC_TBL: Modified: projects/clang360-import/contrib/mdocml/mdoc_term.c ============================================================================== --- projects/clang360-import/contrib/mdocml/mdoc_term.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/mdoc_term.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.311 2015/02/17 20:37:17 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.313 2015/03/06 15:48:52 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze @@ -348,6 +348,8 @@ print_mdoc_node(DECL_ARGS) p->flags |= TERMP_NOSPACE; break; case MDOC_TBL: + if (p->tbl.cols == NULL) + term_newln(p); term_tbl(p, n->span); break; default: @@ -1808,7 +1810,7 @@ static int termp_sp_pre(DECL_ARGS) { struct roffsu su; - size_t i, len; + int i, len; switch (n->tok) { case MDOC_sp: @@ -1829,8 +1831,11 @@ termp_sp_pre(DECL_ARGS) if (0 == len) term_newln(p); - for (i = 0; i < len; i++) - term_vspace(p); + else if (len < 0) + p->skipvsp -= len; + else + for (i = 0; i < len; i++) + term_vspace(p); return(0); } Modified: projects/clang360-import/contrib/mdocml/preconv.c ============================================================================== --- projects/clang360-import/contrib/mdocml/preconv.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/preconv.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: preconv.c,v 1.13 2014/12/19 04:58:35 schwarze Exp $ */ +/* $Id: preconv.c,v 1.14 2015/03/06 09:24:59 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -33,7 +33,7 @@ preconv_encode(struct buf *ib, size_t *i int nby; unsigned int accum; - cu = ib->buf + *ii; + cu = (unsigned char *)ib->buf + *ii; assert(*cu & 0x80); if ( ! (*filenc & MPARSE_UTF8)) Modified: projects/clang360-import/contrib/mdocml/read.c ============================================================================== --- projects/clang360-import/contrib/mdocml/read.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/read.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.129 2015/03/02 14:50:17 schwarze Exp $ */ +/* $Id: read.c,v 1.131 2015/03/11 13:05:20 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -636,7 +636,7 @@ read_whole_file(struct mparse *curp, con */ if (S_ISREG(st.st_mode)) { - if (st.st_size >= (1U << 31)) { + if (st.st_size > 0x7fffffff) { mandoc_msg(MANDOCERR_TOOLARGE, curp, 0, 0, NULL); return(0); } Modified: projects/clang360-import/contrib/mdocml/tbl_term.c ============================================================================== --- projects/clang360-import/contrib/mdocml/tbl_term.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/tbl_term.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: tbl_term.c,v 1.38 2015/01/31 00:12:41 schwarze Exp $ */ +/* $Id: tbl_term.c,v 1.40 2015/03/06 15:48:53 schwarze Exp $ */ /* * Copyright (c) 2009, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2014, 2015 Ingo Schwarze @@ -82,8 +82,6 @@ term_tbl(struct termp *tp, const struct */ if (tp->tbl.cols == NULL) { - term_flushln(tp); - tp->tbl.len = term_tbl_len; tp->tbl.slen = term_tbl_strlen; tp->tbl.arg = tp; Modified: projects/clang360-import/contrib/mdocml/term.c ============================================================================== --- projects/clang360-import/contrib/mdocml/term.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/contrib/mdocml/term.c Sun Mar 15 11:58:52 2015 (r280030) @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.244 2015/01/31 00:12:41 schwarze Exp $ */ +/* $Id: term.c,v 1.245 2015/03/06 13:02:43 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -413,6 +413,7 @@ term_word(struct termp *p, const char *w p->flags |= TERMP_NOSPACE; p->flags &= ~(TERMP_SENTENCE | TERMP_NONEWLINE); + p->skipvsp = 0; while ('\0' != *word) { if ('\\' != *word) { Modified: projects/clang360-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- projects/clang360-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sun Mar 15 11:58:52 2015 (r280030) @@ -2775,8 +2775,12 @@ zvol_geom_worker(void *arg) break; case BIO_READ: case BIO_WRITE: + case BIO_DELETE: zvol_strategy(bp); break; + default: + g_io_deliver(bp, EOPNOTSUPP); + break; } } } Modified: projects/clang360-import/sys/dev/iscsi_initiator/isc_sm.c ============================================================================== --- projects/clang360-import/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 15 11:58:52 2015 (r280030) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -586,14 +587,15 @@ isc_dump_options(SYSCTL_HANDLER_ARGS) { int error; isc_session_t *sp; - char buf[1024], *bp; + struct sbuf sb; + + sbuf_new_for_sysctl(&sb, NULL, 128, req); sp = (isc_session_t *)arg1; - bp = buf; - sprintf(bp, "targetname='%s'", sp->opt.targetName); - bp += strlen(bp); - sprintf(bp, " targetname='%s'", sp->opt.targetAddress); - error = SYSCTL_OUT(req, buf, strlen(buf)); + sbuf_printf(&sb, "targetname='%s'", sp->opt.targetName); + sbuf_printf(&sb, " targetaddress='%s'", sp->opt.targetAddress); + error = sbuf_finish(&sb); + sbuf_delete(&sb); return error; } #endif @@ -603,51 +605,24 @@ isc_dump_stats(SYSCTL_HANDLER_ARGS) { isc_session_t *sp; struct isc_softc *sc; - char buf[1024], *bp; - int error, n; - + int error; + struct sbuf sb; + sp = (isc_session_t *)arg1; sc = sp->isc; - bp = buf; - n = sizeof(buf); - snprintf(bp, n, "recv=%d sent=%d", sp->stats.nrecv, sp->stats.nsent); - bp += strlen(bp); - n -= strlen(bp); - snprintf(bp, n, " flags=0x%08x pdus-alloc=%d pdus-max=%d", - sp->flags, sc->npdu_alloc, sc->npdu_max); - bp += strlen(bp); - n -= strlen(bp); - snprintf(bp, n, " cws=%d cmd=%x exp=%x max=%x stat=%x itt=%x", - sp->cws, sp->sn.cmd, sp->sn.expCmd, sp->sn.maxCmd, sp->sn.stat, sp->sn.itt); - error = SYSCTL_OUT(req, buf, strlen(buf)); - return error; -} + sbuf_new_for_sysctl(&sb, NULL, 128, req); -static int -isc_sysctl_targetName(SYSCTL_HANDLER_ARGS) -{ - char buf[128], **cp; - int error; - - cp = (char **)arg1; - snprintf(buf, sizeof(buf), "%s", *cp); - error = SYSCTL_OUT(req, buf, strlen(buf)); + sbuf_printf(&sb, "recv=%d sent=%d", sp->stats.nrecv, sp->stats.nsent); + sbuf_printf(&sb, " flags=0x%08x pdus-alloc=%d pdus-max=%d", + sp->flags, sc->npdu_alloc, sc->npdu_max); + sbuf_printf(&sb, " cws=%d cmd=%x exp=%x max=%x stat=%x itt=%x", + sp->cws, sp->sn.cmd, sp->sn.expCmd, sp->sn.maxCmd, sp->sn.stat, sp->sn.itt); + error = sbuf_finish(&sb); + sbuf_delete(&sb); return error; } - -static int -isc_sysctl_targetAddress(SYSCTL_HANDLER_ARGS) -{ - char buf[128], **cp; - int error; - cp = (char **)arg1; - snprintf(buf, sizeof(buf), "%s", *cp); - error = SYSCTL_OUT(req, buf, strlen(buf)); - return error; -} - static void isc_add_sysctls(isc_session_t *sp) { @@ -668,7 +643,7 @@ isc_add_sysctls(isc_session_t *sp) "targetname", CTLTYPE_STRING | CTLFLAG_RD, (void *)&sp->opt.targetName, 0, - isc_sysctl_targetName, "A", "target name"); + sysctl_handle_string, "A", "target name"); SYSCTL_ADD_PROC(&sp->clist, SYSCTL_CHILDREN(sp->oid), @@ -676,7 +651,7 @@ isc_add_sysctls(isc_session_t *sp) "targeaddress", CTLTYPE_STRING | CTLFLAG_RD, (void *)&sp->opt.targetAddress, 0, - isc_sysctl_targetAddress, "A", "target address"); + sysctl_handle_string, "A", "target address"); SYSCTL_ADD_PROC(&sp->clist, SYSCTL_CHILDREN(sp->oid), Modified: projects/clang360-import/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- projects/clang360-import/sys/dev/usb/net/usb_ethernet.c Sun Mar 15 11:56:52 2015 (r280029) +++ projects/clang360-import/sys/dev/usb/net/usb_ethernet.c Sun Mar 15 11:58:52 2015 (r280030) @@ -155,7 +155,7 @@ ue_sysctl_parent(SYSCTL_HANDLER_ARGS) const char *name; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***