OSDN Git Service

Make a failure of the BLKDISCARD ioctl non-fatal.
authorKen Sumrall <ksumrall@android.com>
Wed, 23 Mar 2011 03:18:02 +0000 (20:18 -0700)
committerKen Sumrall <ksumrall@android.com>
Wed, 23 Mar 2011 03:18:02 +0000 (20:18 -0700)
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

index c7329cf..3bd33e5 100644 (file)
@@ -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");