Commit a83c39e0 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/391684


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 77ad7cad
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
	}