From 427c3a2177eb4d34c88406bb86107548737168cc Mon Sep 17 00:00:00 2001 From: Ken Sumrall Date: Tue, 22 Mar 2011 20:18:02 -0700 Subject: [PATCH] Make a failure of the BLKDISCARD ioctl non-fatal. Failure to erase the partition before making a new filesystem should not be fatal, especially since this is called from recovery, and if make_ext4fs() dies, recovery dies. Change-Id: I1b50b8c486d403a5d9cbd5e9de73cf752d8ef8f7 --- ext4_utils/wipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext4_utils/wipe.c b/ext4_utils/wipe.c index c7329cf3..3bd33e5b 100644 --- a/ext4_utils/wipe.c +++ b/ext4_utils/wipe.c @@ -43,7 +43,7 @@ int wipe_block_device(int fd, s64 len) range[1] = len; ret = ioctl(fd, BLKDISCARD, &range); if (ret < 0) { - error("Discard failed\n"); + warn("Discard failed\n"); return 1; } else { warn("Wipe via secure discard failed, used discard instead\n"); -- 2.11.0