diff options
Diffstat (limited to 'lib/sisfileheader.cpp')
-rw-r--r-- | lib/sisfileheader.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/sisfileheader.cpp b/lib/sisfileheader.cpp index 19724c3..97e0687 100644 --- a/lib/sisfileheader.cpp +++ b/lib/sisfileheader.cpp @@ -29,6 +29,22 @@ const int OFF_NUMBER_OF_FILES = 26; const int OFF_INSTALLATION_DRIVE = 28; SisRC +SISFileHeader::compareApp(SISFileHeader* other) +{ + if (m_uid1 != other->m_uid1) + return SIS_DIFFERENT_APP; + if ((m_major < other->m_major) || + ((m_major == other->m_major) && + (m_minor < other->m_minor))) + return SIS_VER_EARLIER; + if ((m_major == other->m_major) && + (m_minor == other->m_minor) && + (m_variant != other->m_variant)) + return SIS_OTHER_VARIANT; + return SIS_SAME_OR_LATER; +} + +SisRC SISFileHeader::fillFrom(uint8_t* buf, int* base, off_t len) { if (*base + 68 > len) |