Loading updater/blockimg.c +5 −9 Original line number Diff line number Diff line Loading @@ -39,11 +39,6 @@ #define BLOCKSIZE 4096 // Set this to 0 to interpret 'erase' transfers to mean do a // BLKDISCARD ioctl (the normal behavior). Set to 1 to interpret // erase to mean fill the region with zeroes. #define DEBUG_ERASE 0 #ifndef BLKDISCARD #define BLKDISCARD _IO(0x12,119) #endif Loading Loading @@ -1283,8 +1278,7 @@ static int PerformCommandZero(CommandParameters* params) { } if (params->cmdname[0] == 'z') { // Update only for the zero command, as the erase command will call // this if DEBUG_ERASE is defined. // Update only for the zero command, as the erase command will call this params->written += tgt->size; } Loading Loading @@ -1470,8 +1464,10 @@ static int PerformCommandErase(CommandParameters* params) { struct stat st; uint64_t blocks[2]; if (DEBUG_ERASE) { return PerformCommandZero(params); // Always zero the blocks first to work around possibly flaky BLKDISCARD // Bug: 20881595 if (PerformCommandZero(params) != 0) { goto pceout; } if (!params) { Loading Loading
updater/blockimg.c +5 −9 Original line number Diff line number Diff line Loading @@ -39,11 +39,6 @@ #define BLOCKSIZE 4096 // Set this to 0 to interpret 'erase' transfers to mean do a // BLKDISCARD ioctl (the normal behavior). Set to 1 to interpret // erase to mean fill the region with zeroes. #define DEBUG_ERASE 0 #ifndef BLKDISCARD #define BLKDISCARD _IO(0x12,119) #endif Loading Loading @@ -1283,8 +1278,7 @@ static int PerformCommandZero(CommandParameters* params) { } if (params->cmdname[0] == 'z') { // Update only for the zero command, as the erase command will call // this if DEBUG_ERASE is defined. // Update only for the zero command, as the erase command will call this params->written += tgt->size; } Loading Loading @@ -1470,8 +1464,10 @@ static int PerformCommandErase(CommandParameters* params) { struct stat st; uint64_t blocks[2]; if (DEBUG_ERASE) { return PerformCommandZero(params); // Always zero the blocks first to work around possibly flaky BLKDISCARD // Bug: 20881595 if (PerformCommandZero(params) != 0) { goto pceout; } if (!params) { Loading