From 24437935e708ab866d8a9c032cf4b9a1b175125d Mon Sep 17 00:00:00 2001 From: jakcron Date: Tue, 22 May 2018 10:30:31 +0800 Subject: [PATCH] [nstool] Made a disctinction between NSP and PFS, for future use. --- programs/nstool/source/UserSettings.cpp | 7 ++++--- programs/nstool/source/main.cpp | 2 +- programs/nstool/source/nstool.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/programs/nstool/source/UserSettings.cpp b/programs/nstool/source/UserSettings.cpp index 86d57ee..494810f 100644 --- a/programs/nstool/source/UserSettings.cpp +++ b/programs/nstool/source/UserSettings.cpp @@ -565,10 +565,11 @@ FileType UserSettings::getFileTypeFromString(const std::string& type_str) FileType type; if (str == "xci") type = FILE_XCI; - else if (str == "partitionfs" \ + else if (str == "nsp") // may become its own + type = FILE_NSP; + else if (str == "partitionfs" || str == "hashedpartitionfs" \ || str == "pfs" || str == "pfs0" \ - || str == "hfs" || str == "hfs0" \ - || str == "nsp") + || str == "hfs" || str == "hfs0") type = FILE_PARTITIONFS; else if (str == "romfs") type = FILE_ROMFS; diff --git a/programs/nstool/source/main.cpp b/programs/nstool/source/main.cpp index 89afa70..3dea72a 100644 --- a/programs/nstool/source/main.cpp +++ b/programs/nstool/source/main.cpp @@ -38,7 +38,7 @@ int main(int argc, char** argv) xci.process(); } - else if (user_set.getFileType() == FILE_PARTITIONFS) + else if (user_set.getFileType() == FILE_PARTITIONFS || user_set.getFileType() == FILE_NSP) { PfsProcess pfs; diff --git a/programs/nstool/source/nstool.h b/programs/nstool/source/nstool.h index 54686d2..b38e085 100644 --- a/programs/nstool/source/nstool.h +++ b/programs/nstool/source/nstool.h @@ -13,6 +13,7 @@ static const size_t kNcaKeakNum = nx::nca::kKeyAreaEncryptionKeyNum; enum FileType { FILE_XCI, + FILE_NSP, FILE_PARTITIONFS, FILE_ROMFS, FILE_NCA,