debugger: fix ofnvram commands for Nubus machines.

This commit is contained in:
Maxim Poliakovski
2022-07-18 20:20:55 +02:00
parent c0078ce97d
commit b8915f11a2
3 changed files with 7 additions and 3 deletions
+4 -1
View File
@@ -377,7 +377,6 @@ void enter_debugger() {
size_t separator_pos;
unique_ptr<OfNvramUtils> ofnvram = unique_ptr<OfNvramUtils>(new OfNvramUtils);
ofnvram->init();
context = 1; /* start with the PowerPC context */
@@ -578,11 +577,15 @@ void enter_debugger() {
}
#endif
} else if (cmd == "printenv") {
if (ofnvram->init())
continue;
ofnvram->printenv();
} else if (cmd == "setenv") {
string var_name, value;
ss >> var_name;
ss >> value;
if (ofnvram->init())
continue;
ofnvram->setenv(var_name, value);
} else {
cout << "Unknown command: " << cmd << endl;