From owner-svn-src-all@freebsd.org Sun Feb 5 01:17:06 2017 Return-Path: Delivered-To: svn-src-all@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 B84D7CC5EE1; Sun, 5 Feb 2017 01:17:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 739B3192C; Sun, 5 Feb 2017 01:17:06 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id aBRncNba0cWiHaBRpcfhlP; Sat, 04 Feb 2017 18:16:58 -0700 X-Authority-Analysis: v=2.2 cv=JLBLi4Cb c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=n2v9WMKugxEA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=kJ238s9Cgt9YSbS1S48A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id B313DDDF; Sat, 4 Feb 2017 17:16:55 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v151Gtj1060849; Sat, 4 Feb 2017 17:16:55 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201702050116.v151Gtj1060849@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313191 - head/sbin/nvmecontrol In-Reply-To: Message from Warner Losh of "Sat, 04 Feb 2017 05:53:01 +0000." <201702040553.v145r1wB002775@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 04 Feb 2017 17:16:55 -0800 X-CMAE-Envelope: MS4wfAw5oqgq6bLpMnCdPW81ajfGEKGn2PX0My8H7nMh0UjXj1xl2SoHd3yhTYwTK1cF1R5OcrgLJf0EDIWl9WKLgLXDPqrIVuUoFM1m8Q0SxmpBmCXid33q WdSZJew2PL9Bwi51UplBDBU6Vh0LM8y1xBpA5huXy/tl9K9KdhxezY2Gxpb7z6HbWvG8aCsrwm5UbBDjXjlmUJGgsUd5MdSJgIEiplRBGRRJoSvDqops6W6J 1c8vYMllVW+Ft9jwukNbcQJfKfu55alCbEii7cYDon7JgvznpYHJu4eVWUj8FxMP X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 05 Feb 2017 01:17:06 -0000 In message <201702040553.v145r1wB002775@repo.freebsd.org>, Warner Losh writes: > Author: imp > Date: Sat Feb 4 05:53:00 2017 > New Revision: 313191 > URL: https://svnweb.freebsd.org/changeset/base/313191 > > Log: > Implement 5 wdc-specific nvme control options for their HGST drives: > wdc cap-diag Capture diagnostic data from drive > wdc drive-log Capture drive history data from drive > wdc get-crash-dump Retrieve firmware crash dump from drive > > Added: > head/sbin/nvmecontrol/wdc.c (contents, props changed) > Modified: > head/sbin/nvmecontrol/Makefile > head/sbin/nvmecontrol/nvmecontrol.8 > head/sbin/nvmecontrol/nvmecontrol.c > head/sbin/nvmecontrol/nvmecontrol.h [...] > + while (len > 0) { > + resid = len > NVME_MAX_XFER_SIZE ? NVME_MAX_XFER_SIZE : len; > + wdc_get_data(fd, opcode, resid, offset, cmd, buf, resid); > + if (write(fd2, buf, resid) != resid) Hi Warner, I'm seeing the following on i386. opt/src/svn-current/sbin/nvmecontrol/wdc.c:156:30: error: comparison of integers of different signs: 'ssize_t' (aka 'int') and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare] if (write(fd2, buf, resid) != resid) ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~ 1 error generated. amd64 builds okay. > + err(1, "write"); > + offset += resid; > + len -= resid; > + } > + free(buf); > + close(fd2); [...] -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.