]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: Add helper function to parse 16-bit comma separated list
authorFrancis Pravin Antony Michael Raj <francis.michael@solidigm.com>
Sun, 14 Aug 2022 02:30:08 +0000 (22:30 -0400)
committerFrancis Pravin Antony Michael Raj <francis.michael@solidigm.com>
Sun, 14 Aug 2022 02:30:08 +0000 (22:30 -0400)
commit6b5e9beb125f1faabb03ec884d76494beeb575eb
tree668dabecb32d159da5da0fc56f39ae987160d56a
parent93dd92fefd36581fc795909ed4a1b07e23e92acc
nvme: Add helper function to parse 16-bit comma separated list

In copy command, nlbs is declared as __u16. While parsing command line argument,
it is typecast to integer pointer. So nlbs[1], nlbs[3], nlbs[5], ... are stored
as zero after getting parsed. Therefore it is passing wrong value to controller.
Hence, adding a helper function to parse the 16-bit comma separated list

Signed-off-by: Francis Pravin Antony Michael Raj <francis.michael@solidigm.com>
Signed-off-by: Jonathan Derrick <jonathan.derrick@solidigm.com>
nvme.c
util/argconfig.c
util/argconfig.h