diff options
| author | 2015-01-06 23:36:48 +0000 | |
|---|---|---|
| committer | 2015-01-15 21:21:26 +0000 | |
| commit | 43e699d849ac5dd7a29ff0eeb5821e2a824c091e (patch) | |
| tree | b05f3b2621d59bdd936211245126b51152a89f86 /src/core/loader | |
| parent | Loader: Fix indentation, whitespace, and a few other such cosmetic stuff. (diff) | |
| download | yuzu-43e699d849ac5dd7a29ff0eeb5821e2a824c091e.tar.gz yuzu-43e699d849ac5dd7a29ff0eeb5821e2a824c091e.tar.xz yuzu-43e699d849ac5dd7a29ff0eeb5821e2a824c091e.zip | |
Loader: Don’t duplicate the docstring into the cpp file.
Diffstat (limited to 'src/core/loader')
| -rw-r--r-- | src/core/loader/3dsx.cpp | 4 | ||||
| -rw-r--r-- | src/core/loader/elf.cpp | 6 | ||||
| -rw-r--r-- | src/core/loader/loader.cpp | 5 | ||||
| -rw-r--r-- | src/core/loader/ncch.cpp | 41 |
4 files changed, 0 insertions, 56 deletions
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp index fad544571..06827668f 100644 --- a/src/core/loader/3dsx.cpp +++ b/src/core/loader/3dsx.cpp | |||
| @@ -213,10 +213,6 @@ AppLoader_THREEDSX::AppLoader_THREEDSX(const std::string& filename) : filename(f | |||
| 213 | AppLoader_THREEDSX::~AppLoader_THREEDSX() { | 213 | AppLoader_THREEDSX::~AppLoader_THREEDSX() { |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | /** | ||
| 217 | * Loads a 3DSX file | ||
| 218 | * @return Success on success, otherwise Error | ||
| 219 | */ | ||
| 220 | ResultStatus AppLoader_THREEDSX::Load() { | 216 | ResultStatus AppLoader_THREEDSX::Load() { |
| 221 | LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str()); | 217 | LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str()); |
| 222 | FileUtil::IOFile file(filename, "rb"); | 218 | FileUtil::IOFile file(filename, "rb"); |
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index 3ca60c072..89664229a 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp | |||
| @@ -339,12 +339,6 @@ AppLoader_ELF::AppLoader_ELF(const std::string& filename) : is_loaded(false) { | |||
| 339 | AppLoader_ELF::~AppLoader_ELF() { | 339 | AppLoader_ELF::~AppLoader_ELF() { |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | /** | ||
| 343 | * Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI) | ||
| 344 | * @param error_string Pointer to string to put error message if an error has occurred | ||
| 345 | * @todo Move NCSD parsing out of here and create a separate function for loading these | ||
| 346 | * @return True on success, otherwise false | ||
| 347 | */ | ||
| 348 | ResultStatus AppLoader_ELF::Load() { | 342 | ResultStatus AppLoader_ELF::Load() { |
| 349 | LOG_INFO(Loader, "Loading ELF file %s...", filename.c_str()); | 343 | LOG_INFO(Loader, "Loading ELF file %s...", filename.c_str()); |
| 350 | 344 | ||
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 45cf425df..32196a1dc 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -53,11 +53,6 @@ FileType IdentifyFile(const std::string &filename) { | |||
| 53 | return FileType::Unknown; | 53 | return FileType::Unknown; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | /** | ||
| 57 | * Identifies and loads a bootable file | ||
| 58 | * @param filename String filename of bootable file | ||
| 59 | * @return ResultStatus result of function | ||
| 60 | */ | ||
| 61 | ResultStatus LoadFile(const std::string& filename) { | 56 | ResultStatus LoadFile(const std::string& filename) { |
| 62 | LOG_INFO(Loader, "Loading file %s...", filename.c_str()); | 57 | LOG_INFO(Loader, "Loading file %s...", filename.c_str()); |
| 63 | 58 | ||
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index e246cebc4..f1d01252e 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp | |||
| @@ -113,10 +113,6 @@ AppLoader_NCCH::AppLoader_NCCH(const std::string& filename) { | |||
| 113 | AppLoader_NCCH::~AppLoader_NCCH() { | 113 | AppLoader_NCCH::~AppLoader_NCCH() { |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | /** | ||
| 117 | * Loads .code section into memory for booting | ||
| 118 | * @return ResultStatus result of function | ||
| 119 | */ | ||
| 120 | ResultStatus AppLoader_NCCH::LoadExec() const { | 116 | ResultStatus AppLoader_NCCH::LoadExec() const { |
| 121 | if (!is_loaded) | 117 | if (!is_loaded) |
| 122 | return ResultStatus::ErrorNotLoaded; | 118 | return ResultStatus::ErrorNotLoaded; |
| @@ -130,12 +126,6 @@ ResultStatus AppLoader_NCCH::LoadExec() const { | |||
| 130 | return ResultStatus::Error; | 126 | return ResultStatus::Error; |
| 131 | } | 127 | } |
| 132 | 128 | ||
| 133 | /** | ||
| 134 | * Reads an application ExeFS section of an NCCH file into AppLoader (e.g. .code, .logo, etc.) | ||
| 135 | * @param name Name of section to read out of NCCH file | ||
| 136 | * @param buffer Vector to read data into | ||
| 137 | * @return ResultStatus result of function | ||
| 138 | */ | ||
| 139 | ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& buffer) const { | 129 | ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& buffer) const { |
| 140 | // Iterate through the ExeFs archive until we find the .code file... | 130 | // Iterate through the ExeFs archive until we find the .code file... |
| 141 | FileUtil::IOFile file(filename, "rb"); | 131 | FileUtil::IOFile file(filename, "rb"); |
| @@ -187,12 +177,6 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& | |||
| 187 | return ResultStatus::ErrorNotUsed; | 177 | return ResultStatus::ErrorNotUsed; |
| 188 | } | 178 | } |
| 189 | 179 | ||
| 190 | /** | ||
| 191 | * Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI) | ||
| 192 | * @param error_string Pointer to string to put error message if an error has occurred | ||
| 193 | * @todo Move NCSD parsing out of here and create a separate function for loading these | ||
| 194 | * @return True on success, otherwise false | ||
| 195 | */ | ||
| 196 | ResultStatus AppLoader_NCCH::Load() { | 180 | ResultStatus AppLoader_NCCH::Load() { |
| 197 | LOG_INFO(Loader, "Loading NCCH file %s...", filename.c_str()); | 181 | LOG_INFO(Loader, "Loading NCCH file %s...", filename.c_str()); |
| 198 | 182 | ||
| @@ -248,47 +232,22 @@ ResultStatus AppLoader_NCCH::Load() { | |||
| 248 | return ResultStatus::Error; | 232 | return ResultStatus::Error; |
| 249 | } | 233 | } |
| 250 | 234 | ||
| 251 | /** | ||
| 252 | * Get the code (typically .code section) of the application | ||
| 253 | * @param buffer Reference to buffer to store data | ||
| 254 | * @return ResultStatus result of function | ||
| 255 | */ | ||
| 256 | ResultStatus AppLoader_NCCH::ReadCode(std::vector<u8>& buffer) const { | 235 | ResultStatus AppLoader_NCCH::ReadCode(std::vector<u8>& buffer) const { |
| 257 | return LoadSectionExeFS(".code", buffer); | 236 | return LoadSectionExeFS(".code", buffer); |
| 258 | } | 237 | } |
| 259 | 238 | ||
| 260 | /** | ||
| 261 | * Get the icon (typically icon section) of the application | ||
| 262 | * @param buffer Reference to buffer to store data | ||
| 263 | * @return ResultStatus result of function | ||
| 264 | */ | ||
| 265 | ResultStatus AppLoader_NCCH::ReadIcon(std::vector<u8>& buffer) const { | 239 | ResultStatus AppLoader_NCCH::ReadIcon(std::vector<u8>& buffer) const { |
| 266 | return LoadSectionExeFS("icon", buffer); | 240 | return LoadSectionExeFS("icon", buffer); |
| 267 | } | 241 | } |
| 268 | 242 | ||
| 269 | /** | ||
| 270 | * Get the banner (typically banner section) of the application | ||
| 271 | * @param buffer Reference to buffer to store data | ||
| 272 | * @return ResultStatus result of function | ||
| 273 | */ | ||
| 274 | ResultStatus AppLoader_NCCH::ReadBanner(std::vector<u8>& buffer) const { | 243 | ResultStatus AppLoader_NCCH::ReadBanner(std::vector<u8>& buffer) const { |
| 275 | return LoadSectionExeFS("banner", buffer); | 244 | return LoadSectionExeFS("banner", buffer); |
| 276 | } | 245 | } |
| 277 | 246 | ||
| 278 | /** | ||
| 279 | * Get the logo (typically logo section) of the application | ||
| 280 | * @param buffer Reference to buffer to store data | ||
| 281 | * @return ResultStatus result of function | ||
| 282 | */ | ||
| 283 | ResultStatus AppLoader_NCCH::ReadLogo(std::vector<u8>& buffer) const { | 247 | ResultStatus AppLoader_NCCH::ReadLogo(std::vector<u8>& buffer) const { |
| 284 | return LoadSectionExeFS("logo", buffer); | 248 | return LoadSectionExeFS("logo", buffer); |
| 285 | } | 249 | } |
| 286 | 250 | ||
| 287 | /** | ||
| 288 | * Get the RomFS of the application | ||
| 289 | * @param buffer Reference to buffer to store data | ||
| 290 | * @return ResultStatus result of function | ||
| 291 | */ | ||
| 292 | ResultStatus AppLoader_NCCH::ReadRomFS(std::vector<u8>& buffer) const { | 251 | ResultStatus AppLoader_NCCH::ReadRomFS(std::vector<u8>& buffer) const { |
| 293 | FileUtil::IOFile file(filename, "rb"); | 252 | FileUtil::IOFile file(filename, "rb"); |
| 294 | if (file.IsOpen()) { | 253 | if (file.IsOpen()) { |