Re: [ndctl PATCH v3 4/4] ndctl: clean up usage of ndctl_cmd_submit

2019-01-14 Thread Dan Williams
On Mon, Jan 14, 2019 at 10:49 AM Vishal Verma wrote: [..] > I see how it can be replaced now. Here is a revised patch 4 that > includes thses conversions: > > 8< > > > From 5c19c269dd0037c3f68725e0f721784056172433 Mon Sep 17 00:00:00 2001 > From: Vishal Verma > Date: Fri, 11 Jan 2019 18:20:31

Re: [ndctl PATCH v3 4/4] ndctl: clean up usage of ndctl_cmd_submit

2019-01-14 Thread Vishal Verma
On 01/14, Verma, Vishal L wrote: > > On Mon, 2019-01-14 at 10:17 -0800, Dan Williams wrote: > > On Mon, Jan 14, 2019 at 10:11 AM Vishal Verma < > > vishal.l.ve...@intel.com> wrote: > > > > > > It is possible for ndctl_cmd_submit to return a positive number, > > > indicating a buffer underrun. It

Re: [ndctl PATCH v3 4/4] ndctl: clean up usage of ndctl_cmd_submit

2019-01-14 Thread Verma, Vishal L
On Mon, 2019-01-14 at 10:17 -0800, Dan Williams wrote: > On Mon, Jan 14, 2019 at 10:11 AM Vishal Verma < > vishal.l.ve...@intel.com> wrote: > > > > It is possible for ndctl_cmd_submit to return a positive number, > > indicating a buffer underrun. It is only truly an error if it > > returns a > >

Re: [ndctl PATCH v3 4/4] ndctl: clean up usage of ndctl_cmd_submit

2019-01-14 Thread Dan Williams
On Mon, Jan 14, 2019 at 10:11 AM Vishal Verma wrote: > > It is possible for ndctl_cmd_submit to return a positive number, > indicating a buffer underrun. It is only truly an error if it returns a > negative number. Several places in the library, the ndctl utility, and > in test/ were simply checki

[ndctl PATCH v3 4/4] ndctl: clean up usage of ndctl_cmd_submit

2019-01-14 Thread Vishal Verma
It is possible for ndctl_cmd_submit to return a positive number, indicating a buffer underrun. It is only truly an error if it returns a negative number. Several places in the library, the ndctl utility, and in test/ were simply checking for an error with "if (rc)". Fix these to only error out for