Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd391c23 authored by Sami Tolvanen's avatar Sami Tolvanen Committed by Android Git Automerger
Browse files

am aa4df5c4: Merge "Handle BLKDISCARD failures"

* commit 'aa4df5c4':
  Handle BLKDISCARD failures
parents 9a5e2a26 aa4df5c4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1485,7 +1485,6 @@ static int PerformCommandErase(CommandParameters* params) {

    if (!S_ISBLK(st.st_mode)) {
        fprintf(stderr, "not a block device; skipping erase\n");
        rc = 0;
        goto pceout;
    }

@@ -1509,7 +1508,7 @@ static int PerformCommandErase(CommandParameters* params) {

            if (ioctl(params->fd, BLKDISCARD, &blocks) == -1) {
                fprintf(stderr, "BLKDISCARD ioctl failed: %s\n", strerror(errno));
                // Continue anyway, nothing we can do
                goto pceout;
            }
        }
    }