Skip to content

Commit

Permalink
Remove chainloader deletion logic
Browse files Browse the repository at this point in the history
  • Loading branch information
averne committed Nov 9, 2024
1 parent aa568a5 commit a9ea959
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
17 changes: 0 additions & 17 deletions sysmodule/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,6 @@ static constinit fz::DisplayController disp = {};
static constinit fz::ProfileManager profile(context, disp);
static constinit fz::Server server (context, profile);

void delete_chainloader() {
auto rc = fsInitialize();
FZ_SCOPEGUARD([] { fsExit(); });

FsFileSystem fs;
if (R_SUCCEEDED(rc))
rc = fsOpenSdCardFileSystem(&fs);
FZ_SCOPEGUARD([&fs] { fsFsClose(&fs); });

char buf[FS_MAX_PATH] = "/atmosphere/contents/010000000000CF12";
fsFsDeleteDirectoryRecursively(&fs, buf);
}

FsFile find_config_file(FsFileSystem fs) {
FsFile fp = {};
char buf[FS_MAX_PATH];
Expand Down Expand Up @@ -223,10 +210,6 @@ int main(int argc, char **argv) {
if (parse_config())
profile.apply();

// Delete the deprecated chainloader binaries if present
// TODO: Remove this in a future release
delete_chainloader();

LOG("Starting server\n");
if (auto rc = server.initialize(); R_FAILED(rc))
diagAbortWithResult(rc);
Expand Down
2 changes: 1 addition & 1 deletion sysmodule/src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Result Server::command_handler(void *userdata, const IpcServerRequest *r, u8 *ou
if (id < FizeauProfileId_Profile1 || id > FizeauProfileId_Profile4)
return FIZEAU_MAKERESULT(INVALID_PROFILEID);

self->context.profiles[id] = *(FizeauProfile *)((std::uint8_t *)r->data.ptr + std::max(alignof(bool), alignof(FizeauProfile)));
self->context.profiles[id] = *(FizeauProfile *)((std::uint8_t *)r->data.ptr + std::max(alignof(FizeauProfileId), alignof(FizeauProfile)));

if (id == self->context.internal_profile || id == self->context.external_profile) {
if (auto rc = self->profile.apply(); R_FAILED(rc))
Expand Down

0 comments on commit a9ea959

Please sign in to comment.