Handle BLKDISCARD failures

In the block updater, if BLKDISCARD fails, the error is silently
ignored and some of the blocks may not be erased. This means the
target partition will have inconsistent contents.

If the ioctl fails, return an error and abort the update.

Bug: 20614277
Change-Id: I33867ba9337c514de8ffae59f28584b285324067
diff --git a/updater/blockimg.c b/updater/blockimg.c
index ce63600..42060f5 100644
--- a/updater/blockimg.c
+++ b/updater/blockimg.c
@@ -1485,7 +1485,6 @@
 
     if (!S_ISBLK(st.st_mode)) {
         fprintf(stderr, "not a block device; skipping erase\n");
-        rc = 0;
         goto pceout;
     }
 
@@ -1509,7 +1508,7 @@
 
             if (ioctl(params->fd, BLKDISCARD, &blocks) == -1) {
                 fprintf(stderr, "BLKDISCARD ioctl failed: %s\n", strerror(errno));
-                // Continue anyway, nothing we can do
+                goto pceout;
             }
         }
     }