diff options
| author | 2022-02-27 11:08:29 -0500 | |
|---|---|---|
| committer | 2022-02-27 11:11:44 -0500 | |
| commit | 8c20f22955762c85870bdc2ae972018a6acc4258 (patch) | |
| tree | a6d3b49a646ccd311932385717e74b8e2bfcafa0 /src/devices/machine/i2cmem.cpp | |
| parent | 300206e308c2c5f9ad8898fb62f1873be682df5a (diff) | |
Use ioprocs classes instead of emu_file for device_nvram_interface's load and save methods, and have these return false on I/O errors
Diffstat (limited to 'src/devices/machine/i2cmem.cpp')
| -rw-r--r-- | src/devices/machine/i2cmem.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/machine/i2cmem.cpp b/src/devices/machine/i2cmem.cpp index c7ba56e7a93..e21d8c6b6ee 100644 --- a/src/devices/machine/i2cmem.cpp +++ b/src/devices/machine/i2cmem.cpp @@ -25,8 +25,6 @@ there are two standard values. #include "emu.h" #include "machine/i2cmem.h" -#include "fileio.h" - constexpr int STATE_IDLE(0); constexpr int STATE_DEVSEL(1); constexpr int STATE_ADDRESSHIGH(2); @@ -252,9 +250,10 @@ void i2cmem_device::nvram_default() // .nv file //------------------------------------------------- -void i2cmem_device::nvram_read( emu_file &file ) +bool i2cmem_device::nvram_read( util::read_stream &file ) { - file.read( &m_data[0], m_data_size ); + size_t actual; + return !file.read( &m_data[0], m_data_size, actual ) && actual == m_data_size; } //------------------------------------------------- @@ -262,9 +261,10 @@ void i2cmem_device::nvram_read( emu_file &file ) // .nv file //------------------------------------------------- -void i2cmem_device::nvram_write( emu_file &file ) +bool i2cmem_device::nvram_write( util::write_stream &file ) { - file.write( &m_data[0], m_data_size ); + size_t actual; + return !file.write( &m_data[0], m_data_size, actual ) && actual == m_data_size; } |
