mirror of
https://github.com/martravi/wiiqt6.git
synced 2024-11-22 05:29:14 +01:00
* nandBinCheck: show titles that rely on busted shared contents
git-svn-id: http://wiiqt.googlecode.com/svn/trunk@73 389f4c8b-5dfe-645f-db0e-df882bc27289
This commit is contained in:
parent
43ae33972d
commit
ca9ee0ebcc
@ -25,6 +25,8 @@ QByteArray sysMenuResource;
|
||||
QByteArray sysMenuExe;
|
||||
quint64 sysMenuIos;
|
||||
|
||||
QList<QByteArray>BadSharedItems;//remember bad shared items
|
||||
|
||||
bool CheckTitleIntegrity( quint64 tid );
|
||||
|
||||
#ifdef Q_WS_WIN
|
||||
@ -432,11 +434,22 @@ void CheckShared()
|
||||
qDebug() << "checking" << path << "...";
|
||||
QByteArray stuff = nand.GetData( path );
|
||||
if( stuff.isEmpty() )
|
||||
{
|
||||
BadSharedItems << sharedM.Hash( i );
|
||||
Fail( "One of the shared contents in this nand is missing" );
|
||||
}
|
||||
|
||||
QByteArray realHash = GetSha1( stuff );
|
||||
if( realHash != sharedM.Hash( i ) )
|
||||
{
|
||||
BadSharedItems << sharedM.Hash( i );
|
||||
if( verbose )
|
||||
{
|
||||
qCritical() << "\texpected: " << sharedM.Hash( i ).toHex();
|
||||
qCritical() << "\tactual: " << realHash.toHex();
|
||||
}
|
||||
Fail( "The hash for at least 1 content is bad" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -716,6 +729,11 @@ bool CheckTitleIntegrity( quint64 tid )
|
||||
{
|
||||
if( t.Type( i ) == 0x8001 )//shared
|
||||
{
|
||||
if( BadSharedItems.contains( t.Hash( i ) ) )
|
||||
{
|
||||
qWarning() << "\tthis title relies on a shared content that is borked (" << i << ")\n\t" << t.Hash( i ).toHex();
|
||||
return false;
|
||||
}
|
||||
if( sharedM.GetAppFromHash( t.Hash( i ) ).isEmpty() )
|
||||
{
|
||||
qWarning() << "\tone of the shared contents is missing";
|
||||
|
Loading…
Reference in New Issue
Block a user