Lines Matching refs:mock_eeprom
34 int eeprom_mock_init_native(bool eeprom_in_ram, char **mock_eeprom, unsigned int size, in eeprom_mock_init_native() argument
42 *mock_eeprom = (char *)malloc(size); in eeprom_mock_init_native()
43 if (*mock_eeprom == NULL) { in eeprom_mock_init_native()
69 *mock_eeprom = mmap(NULL, size, PROT_WRITE | PROT_READ, MAP_SHARED, *eeprom_fd, 0); in eeprom_mock_init_native()
70 if (*mock_eeprom == MAP_FAILED) { in eeprom_mock_init_native()
79 (void)memset(*mock_eeprom, erase_value, size); in eeprom_mock_init_native()
90 void eeprom_mock_cleanup_native(bool eeprom_in_ram, int eeprom_fd, char *mock_eeprom, in eeprom_mock_cleanup_native() argument
96 if (mock_eeprom != NULL) { in eeprom_mock_cleanup_native()
97 free(mock_eeprom); in eeprom_mock_cleanup_native()
102 if ((mock_eeprom != MAP_FAILED) && (mock_eeprom != NULL)) { in eeprom_mock_cleanup_native()
103 munmap(mock_eeprom, size); in eeprom_mock_cleanup_native()