tbfind.c (e5e1f58a87fc8cfe8597a1cf14ee4de2c7c16dd8) | tbfind.c (278f0de60d655b6b28d4c92affe3603a49228645) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: tbfind - find table 4 * 5 *****************************************************************************/ 6 7/****************************************************************************** 8 * --- 193 unchanged lines hidden (view full) --- 202 (strlen (OemTableId) > ACPI_OEM_TABLE_ID_SIZE)) 203 { 204 return_ACPI_STATUS (AE_AML_STRING_LIMIT); 205 } 206 207 /* Normalize the input strings */ 208 209 memset (&Header, 0, sizeof (ACPI_TABLE_HEADER)); | 1/****************************************************************************** 2 * 3 * Module Name: tbfind - find table 4 * 5 *****************************************************************************/ 6 7/****************************************************************************** 8 * --- 193 unchanged lines hidden (view full) --- 202 (strlen (OemTableId) > ACPI_OEM_TABLE_ID_SIZE)) 203 { 204 return_ACPI_STATUS (AE_AML_STRING_LIMIT); 205 } 206 207 /* Normalize the input strings */ 208 209 memset (&Header, 0, sizeof (ACPI_TABLE_HEADER)); |
210 ACPI_MOVE_NAME (Header.Signature, Signature); | 210 ACPI_COPY_NAMESEG (Header.Signature, Signature); |
211 strncpy (Header.OemId, OemId, ACPI_OEM_ID_SIZE); 212 strncpy (Header.OemTableId, OemTableId, ACPI_OEM_TABLE_ID_SIZE); 213 214 /* Search for the table */ 215 216 (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); 217 for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) 218 { 219 if (memcmp (&(AcpiGbl_RootTableList.Tables[i].Signature), | 211 strncpy (Header.OemId, OemId, ACPI_OEM_ID_SIZE); 212 strncpy (Header.OemTableId, OemTableId, ACPI_OEM_TABLE_ID_SIZE); 213 214 /* Search for the table */ 215 216 (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); 217 for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) 218 { 219 if (memcmp (&(AcpiGbl_RootTableList.Tables[i].Signature), |
220 Header.Signature, ACPI_NAME_SIZE)) | 220 Header.Signature, ACPI_NAMESEG_SIZE)) |
221 { 222 /* Not the requested table */ 223 224 continue; 225 } 226 227 /* Table with matching signature has been found */ 228 --- 11 unchanged lines hidden (view full) --- 240 { 241 continue; 242 } 243 } 244 245 /* Check for table match on all IDs */ 246 247 if (!memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->Signature, | 221 { 222 /* Not the requested table */ 223 224 continue; 225 } 226 227 /* Table with matching signature has been found */ 228 --- 11 unchanged lines hidden (view full) --- 240 { 241 continue; 242 } 243 } 244 245 /* Check for table match on all IDs */ 246 247 if (!memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->Signature, |
248 Header.Signature, ACPI_NAME_SIZE) && | 248 Header.Signature, ACPI_NAMESEG_SIZE) && |
249 (!OemId[0] || 250 !memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->OemId, 251 Header.OemId, ACPI_OEM_ID_SIZE)) && 252 (!OemTableId[0] || 253 !memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->OemTableId, 254 Header.OemTableId, ACPI_OEM_TABLE_ID_SIZE))) 255 { 256 *TableIndex = i; --- 12 unchanged lines hidden --- | 249 (!OemId[0] || 250 !memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->OemId, 251 Header.OemId, ACPI_OEM_ID_SIZE)) && 252 (!OemTableId[0] || 253 !memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->OemTableId, 254 Header.OemTableId, ACPI_OEM_TABLE_ID_SIZE))) 255 { 256 *TableIndex = i; --- 12 unchanged lines hidden --- |