mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 02:06:40 +00:00
Update PfsProcess to use PartitionFsUtil
This commit is contained in:
parent
9c7df06712
commit
ea2dd32e32
2 changed files with 7 additions and 24 deletions
|
@ -1,8 +1,13 @@
|
|||
#include "PfsProcess.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
#include <fnd/SimpleFile.h>
|
||||
#include <fnd/io.h>
|
||||
#include "PfsProcess.h"
|
||||
|
||||
#include <nn/hac/PartitionFsUtil.h>
|
||||
|
||||
|
||||
PfsProcess::PfsProcess() :
|
||||
mFile(),
|
||||
|
@ -95,7 +100,7 @@ void PfsProcess::importHeader()
|
|||
void PfsProcess::displayHeader()
|
||||
{
|
||||
std::cout << "[PartitionFS]" << std::endl;
|
||||
std::cout << " Type: " << getFsTypeStr(mPfs.getFsType()) << std::endl;
|
||||
std::cout << " Type: " << nn::hac::PartitionFsUtil::getFsTypeAsString(mPfs.getFsType()) << std::endl;
|
||||
std::cout << " FileNum: " << std::dec << mPfs.getFileList().size() << std::endl;
|
||||
if (mMountName.empty() == false)
|
||||
{
|
||||
|
@ -191,24 +196,4 @@ void PfsProcess::extractFs()
|
|||
}
|
||||
outFile.close();
|
||||
}
|
||||
}
|
||||
|
||||
const char* PfsProcess::getFsTypeStr(nn::hac::PartitionFsHeader::FsType type) const
|
||||
{
|
||||
const char* str = nullptr;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case (nn::hac::PartitionFsHeader::TYPE_PFS0):
|
||||
str = "PFS0";
|
||||
break;
|
||||
case (nn::hac::PartitionFsHeader::TYPE_HFS0):
|
||||
str = "HFS0";
|
||||
break;
|
||||
default:
|
||||
str = "Unknown";
|
||||
break;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
|
@ -50,6 +50,4 @@ private:
|
|||
bool validateHeaderMagic(const nn::hac::sPfsHeader* hdr);
|
||||
void validateHfs();
|
||||
void extractFs();
|
||||
|
||||
const char* getFsTypeStr(nn::hac::PartitionFsHeader::FsType type) const;
|
||||
};
|
Loading…
Reference in a new issue