@@ -1355,6 +1355,11 @@ fio_sync(char const* path, fio_location location)
13551355}
13561356}
13571357
1358+ enum {
1359+ GET_CRC32_DECOMPRESS = 1 ,
1360+ GET_CRC32_MISSING_OK = 2
1361+ };
1362+
13581363/* Get crc32 of file */
13591364pg_crc32
13601365fio_get_crc32 (const char * file_path ,fio_location location ,
@@ -1371,9 +1376,9 @@ fio_get_crc32(const char *file_path, fio_location location,
13711376hdr .arg = 0 ;
13721377
13731378if (decompress )
1374- hdr .arg = 1 ;
1379+ hdr .arg = GET_CRC32_DECOMPRESS ;
13751380if (missing_ok )
1376- hdr .arg |=2 ;
1381+ hdr .arg |=GET_CRC32_MISSING_OK ;
13771382
13781383IO_CHECK (fio_write_all (fio_stdout ,& hdr ,sizeof (hdr )),sizeof (hdr ));
13791384IO_CHECK (fio_write_all (fio_stdout ,file_path ,path_len ),path_len );
@@ -3383,10 +3388,10 @@ fio_communicate(int in, int out)
33833388break ;
33843389case FIO_GET_CRC32 :
33853390/* calculate crc32 for a file */
3386- if ((hdr .arg & 1 ))
3387- crc = pgFileGetCRCgz (buf , true, (hdr .arg & 2 )!= 0 );
3391+ if ((hdr .arg & GET_CRC32_DECOMPRESS ))
3392+ crc = pgFileGetCRCgz (buf , true, (hdr .arg & GET_CRC32_MISSING_OK )!= 0 );
33883393else
3389- crc = pgFileGetCRC (buf , true, (hdr .arg & 2 )!= 0 );
3394+ crc = pgFileGetCRC (buf , true, (hdr .arg & GET_CRC32_MISSING_OK )!= 0 );
33903395IO_CHECK (fio_write_all (out ,& crc ,sizeof (crc )),sizeof (crc ));
33913396break ;
33923397case FIO_GET_CHECKSUM_MAP :