Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Feb 2017 17:16:55 -0800
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Warner Losh <imp@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r313191 - head/sbin/nvmecontrol
Message-ID:  <201702050116.v151Gtj1060849@slippy.cwsent.com>
In-Reply-To: Message from Warner Losh <imp@FreeBSD.org> of "Sat, 04 Feb 2017 05:53:01 %2B0000." <201702040553.v145r1wB002775@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702050116.v151Gtj1060849>