Spdk/lib/bdev
Shuhei Matsumoto b78e763c1a string: spdk_strtol to delegate additional error checking
Error check of strtol is left to users of it. But some use cases
of strtol in SPDK do not have enough error check yet.

For example, strtol returns 0 if there were no digits at all.

It should be avoided for each use case to add enough error checking
for strtol.

Hence spdk_strtol and spdk_strtoll do additional error checking
according to the description of manual of strtol.

Besides, there is no use case of negative number now, and to keep
simplicity, spdk_trtol and spdk_strtoll allows only strings that
is positive number or zero.

As a result of this policy, callers of them only have to check if
the return value is not negative.

Subsequent patches will replace atoi to spdk_strtol because atoi
does not have error check.

Change-Id: If3d549970595e53b1141674e47710fe4dd062bc5
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/441626
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-29 00:10:57 +00:00
..
aio bdev_aio: enable double buffering on write path 2018-11-12 21:56:24 +00:00
crypto bdev/crypto: align I/O buffers for encrypt 2019-01-24 21:52:22 +00:00
error bdev/error: remove an unnecessary "enabled" flag 2019-01-15 16:43:20 +00:00
ftl bdev_ftl: Added FTL bdev module 2019-01-24 18:55:56 +00:00
gpt bdev/gpt: examine my_lba in primary header 2019-01-14 21:26:46 +00:00
iscsi bdev: Use not C++ style comments // but C-style comments /* */ 2018-10-31 22:01:47 +00:00
lvol lvol: add option to change default data erase method 2019-01-23 22:25:37 +00:00
malloc Make: Add deps for each shared obj individually 2018-10-09 21:45:26 +00:00
null string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
nvme string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
ocf OCF: use rte_pause in wait loop 2019-01-28 19:24:13 +00:00
passthru bdev/passthru: unregister IO device in vbdev destruct callback 2018-11-16 07:47:55 +00:00
pmem pmem: print logs on debug build 2018-12-05 15:20:07 +00:00
raid bdev/raid: raid_bdev_add_base_device: fix wrong param in log 2018-11-02 22:19:02 +00:00
rbd string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
rpc histograms: add rpc calls 2019-01-24 14:14:32 +00:00
split bdev/split: use per-base split tailq 2018-11-28 22:51:30 +00:00
virtio bdev/virtio: Remove deprecated remove_virtio_scsi_bdev rpc 2019-01-28 22:18:53 +00:00
bdev.c bdev: avoid qos submission recursion 2019-01-28 05:18:16 +00:00
Makefile OCF: add OCF module 2019-01-28 09:41:52 +00:00
part.c bdev: Improve spdk_bdev_open() to print string describing error number 2019-01-24 10:50:34 +00:00
scsi_nvme.c bdev: move error union to internal spdk_bdev_io struct 2018-06-26 20:04:07 +00:00
vtune.c mk: don't use '-include spdk/config.h' 2018-10-02 23:13:32 +00:00