bdev_malloc: Remove use of perror() for spdk_dma_zmalloc failure

All SPDK libraries should use the spdk/log.h family of functions
for logging.

Change-Id: I088f62e6035aa1885ad0973a033ecee2f325ed30
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/391684
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Shuhei Matsumoto 2017-12-15 15:25:39 +09:00 committed by Jim Harris
parent 77ad7caddb
commit a83c39e0b4

View File

@ -364,7 +364,7 @@ struct spdk_bdev *create_malloc_disk(const char *name, uint64_t num_blocks, uint
mdisk = spdk_dma_zmalloc(sizeof(*mdisk), 0, NULL);
if (!mdisk) {
perror("mdisk");
SPDK_ERRLOG("mdisk spdk_dma_zmalloc() failed\n");
return NULL;
}
@ -376,7 +376,7 @@ struct spdk_bdev *create_malloc_disk(const char *name, uint64_t num_blocks, uint
*/
mdisk->malloc_buf = spdk_dma_zmalloc(num_blocks * block_size, 2 * 1024 * 1024, NULL);
if (!mdisk->malloc_buf) {
SPDK_ERRLOG("spdk_dma_zmalloc failed\n");
SPDK_ERRLOG("malloc_buf spdk_dma_zmalloc() failed\n");
malloc_disk_free(mdisk);
return NULL;
}