Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
e0cfd6b0
There was an error fetching the commit references. Please try again later.
Commit
e0cfd6b0
authored
11 years ago
by
ShizZy
Browse files
Options
Downloads
Patches
Plain Diff
renamed FILETYPE_CTR_DIRECTORY to FILETYPE_DIRECTORY_CXI
parent
8a95dd3f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/src/loader.cpp
+9
-11
9 additions, 11 deletions
src/core/src/loader.cpp
src/core/src/loader.h
+1
-1
1 addition, 1 deletion
src/core/src/loader.h
with
10 additions
and
12 deletions
src/core/src/loader.cpp
+
9
−
11
View file @
e0cfd6b0
...
...
@@ -29,7 +29,8 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
bool
LoadDirectory
(
std
::
string
&
filename
)
{
/// Loads an extracted CXI from a directory
bool
LoadDirectory_CXI
(
std
::
string
&
filename
)
{
std
::
string
full_path
=
filename
;
std
::
string
path
,
file
,
extension
;
SplitPath
(
ReplaceAll
(
full_path
,
"
\\
"
,
"/"
),
&
path
,
&
file
,
&
extension
);
...
...
@@ -40,11 +41,11 @@ bool LoadDirectory(std::string &filename) {
System
::
g_ctr_file_system
.
Mount
(
"fs:"
,
fs
);
std
::
string
final_name
=
"fs:/"
+
file
+
extension
;
//
File::IOFile f(filename, "rb");
File
::
IOFile
f
(
filename
,
"rb"
);
//
if (f.IsOpen()) {
if
(
f
.
IsOpen
())
{
// TODO(ShizZy): read here to memory....
//
}
}
ERROR_LOG
(
TIME
,
"Unimplemented function!"
);
return
true
;
}
...
...
@@ -71,7 +72,7 @@ FileType IdentifyFile(std::string &filename) {
if
(
File
::
IsDirectory
(
filename
))
{
if
(
IsBootableDirectory
())
{
return
FILETYPE_
CTR_
DIRECTORY
;
return
FILETYPE_DIRECTORY
_CXI
;
}
else
{
return
FILETYPE_NORMAL_DIRECTORY
;
}
...
...
@@ -97,12 +98,9 @@ bool LoadFile(std::string &filename, std::string *error_string) {
INFO_LOG
(
LOADER
,
"Identifying file..."
);
// Note that this can modify filename!
switch
(
IdentifyFile
(
filename
))
{
case
FILETYPE_CTR_DIRECTORY
:
{
INFO_LOG
(
LOADER
,
"File is a BIN !"
);
return
LoadDirectory
(
filename
);
}
case
FILETYPE_DIRECTORY_CXI
:
return
LoadDirectory_CXI
(
filename
);
case
FILETYPE_ERROR
:
ERROR_LOG
(
LOADER
,
"Could not read file"
);
...
...
This diff is collapsed.
Click to expand it.
src/core/src/loader.h
+
1
−
1
View file @
e0cfd6b0
...
...
@@ -39,7 +39,7 @@ enum FileType {
FILETYPE_CTR_CXI
,
FILETYPE_CTR_ELF
,
FILETYPE_
CTR_
DIRECTORY
,
FILETYPE_DIRECTORY
_CXI
,
FILETYPE_UNKNOWN_BIN
,
FILETYPE_UNKNOWN_ELF
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment