summaryrefslogtreecommitdiffstats
path: root/src/devices/machine/ataflash.cpp
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2021-08-22 09:06:15 +1000
committer GitHub <noreply@github.com>2021-08-22 09:06:15 +1000
commite8bbea1fc6e94e14768509d322f6c624403ffb36 (patch)
tree74dd1606a900d83de8aecff17a6737af4113308d /src/devices/machine/ataflash.cpp
parente319bde5fc3696d7f48f62b15b6366c4377fe5d1 (diff)
formats, osd, util: Started refactoring file I/O stuff. (#8456)
Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
Diffstat (limited to 'src/devices/machine/ataflash.cpp')
-rw-r--r--src/devices/machine/ataflash.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/machine/ataflash.cpp b/src/devices/machine/ataflash.cpp
index 464bd074cdf..155ec34bcd3 100644
--- a/src/devices/machine/ataflash.cpp
+++ b/src/devices/machine/ataflash.cpp
@@ -140,7 +140,7 @@ void taito_pccard1_device::device_reset()
uint32_t metalength;
memset(m_key, 0, sizeof(m_key));
- if (m_handle != nullptr && m_handle->read_metadata(HARD_DISK_KEY_METADATA_TAG, 0, m_key, 5, metalength) == CHDERR_NONE)
+ if (m_handle && !m_handle->read_metadata(HARD_DISK_KEY_METADATA_TAG, 0, m_key, 5, metalength))
{
m_locked = 0x1ff;
}
@@ -231,7 +231,7 @@ void taito_pccard2_device::device_reset()
uint32_t metalength;
memset(m_key, 0, sizeof(m_key));
- if (m_handle != nullptr && m_handle->read_metadata(HARD_DISK_KEY_METADATA_TAG, 0, m_key, 5, metalength) == CHDERR_NONE)
+ if (m_handle && !m_handle->read_metadata(HARD_DISK_KEY_METADATA_TAG, 0, m_key, 5, metalength))
{
m_locked = true;
}
@@ -330,7 +330,7 @@ void taito_compact_flash_device::device_reset()
uint32_t metalength;
memset(m_key, 0, sizeof(m_key));
- if (m_handle != nullptr && m_handle->read_metadata(HARD_DISK_KEY_METADATA_TAG, 0, m_key, 5, metalength) == CHDERR_NONE)
+ if (m_handle && !m_handle->read_metadata(HARD_DISK_KEY_METADATA_TAG, 0, m_key, 5, metalength))
{
m_locked = true;
}