gpt: fix naming of CRC32 polynomial #define

GPT uses the standard IEEE CRC-32 polynomial, not CRC-32C.

Change-Id: I94dae01ec7b31cb3c3efc735d9dfa4e0cfea9ce4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369306
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Daniel Verkamp 2017-07-12 15:26:56 -07:00
parent 931e3d51d9
commit 7ae3fcd02a

View File

@ -46,7 +46,7 @@
#define PRIMARY_PARTITION_NUMBER 4
#define GPT_PROTECTIVE_MBR 1
#define SPDK_MAX_NUM_PARTITION_ENTRIES 128
#define SPDK_GPT_CRC32C_POLYNOMIAL_REFLECT 0xedb88320UL
#define SPDK_GPT_CRC32_POLYNOMIAL_REFLECT 0xedb88320UL
static uint32_t spdk_gpt_crc32_table[256];
@ -60,7 +60,7 @@ spdk_gpt_init_crc32(void)
val = i;
for (j = 0; j < 8; j++) {
if (val & 1) {
val = (val >> 1) ^ SPDK_GPT_CRC32C_POLYNOMIAL_REFLECT;
val = (val >> 1) ^ SPDK_GPT_CRC32_POLYNOMIAL_REFLECT;
} else {
val = (val >> 1);
}