From 039fb3bc6b5e7e3431ec22bc2ff69722b86ebd27 Mon Sep 17 00:00:00 2001 From: billw2012 Date: Fri, 10 Aug 2018 20:42:34 +0100 Subject: [PATCH 1/4] labormanager: add option to disable the management of a labor. Also switching to case insensitive labor name matching. --- plugins/labormanager/labormanager.cpp | 67 +++++++++++++++++++-------- 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/plugins/labormanager/labormanager.cpp b/plugins/labormanager/labormanager.cpp index 7e42afd64..55cbc8c0e 100644 --- a/plugins/labormanager/labormanager.cpp +++ b/plugins/labormanager/labormanager.cpp @@ -100,6 +100,11 @@ enum ConfigFlags { CF_ALLOW_HUNTING = 4, }; +// Value of 0 for max dwarfs means uncapped. +const int MAX_DWARFS_NONE = 0; +// Value < 0 for max dwarfs means don't manager the labor. +const int MAX_DWARFS_DISABLE = -1; + // Here go all the command declarations... // mostly to allow having the mandatory stuff on top of the file and commands on the bottom @@ -390,16 +395,18 @@ struct labor_info int idle_dwarfs; int busy_dwarfs; - int priority() { return config.ival(1); } + int priority() const { return config.ival(1); } void set_priority(int priority) { config.ival(1) = priority; } - int maximum_dwarfs() { return config.ival(2); } + bool is_disabled() const { return maximum_dwarfs() == MAX_DWARFS_DISABLE; } + int maximum_dwarfs() const { return config.ival(2); } void set_maximum_dwarfs(int maximum_dwarfs) { config.ival(2) = maximum_dwarfs; } - int time_since_last_assigned() + int time_since_last_assigned() const { return (*df::global::cur_year - config.ival(3)) * 403200 + *df::global::cur_year_tick - config.ival(4); } + void mark_assigned() { config.ival(3) = (*df::global::cur_year); config.ival(4) = (*df::global::cur_year_tick); @@ -412,7 +419,6 @@ enum tools_enum { TOOLS_MAX }; - struct labor_default { int priority; @@ -841,6 +847,8 @@ DFhackCExport command_result plugin_init(color_ostream &out, std::vector \n" " Set max number of dwarves assigned to a labor.\n" + " labormanager max disable\n" + " Don't attempt to assign any dwarves to a labor.\n" " labormanager max none\n" " Unrestrict the number of dwarves assigned to a labor.\n" " labormanager priority \n" @@ -944,7 +952,7 @@ private: private: void set_labor(dwarf_info_t* dwarf, df::unit_labor labor, bool value) { - if (labor >= 0 && labor <= ENUM_LAST_ITEM(unit_labor)) + if (labor >= 0 && labor <= ENUM_LAST_ITEM(unit_labor) && !labor_infos[labor].is_disabled()) { if (!Units::isValidLabor(dwarf->dwarf, labor)) { @@ -954,7 +962,6 @@ private: ENUM_KEY_STR(unit_labor, labor).c_str()); return; } - bool old = dwarf->dwarf->status.labors[labor]; dwarf->dwarf->status.labors[labor] = value; if (old != value) @@ -1782,9 +1789,13 @@ public: if (l == df::unit_labor::NONE) continue; - if (labor_infos[l].maximum_dwarfs() > 0 && - i->second > labor_infos[l].maximum_dwarfs()) - i->second = labor_infos[l].maximum_dwarfs(); + const int user_specified_max_dwarfs = labor_infos[l].maximum_dwarfs(); + + // Allow values less than 0, they will disable this labor. + if (user_specified_max_dwarfs != MAX_DWARFS_NONE && i->second > user_specified_max_dwarfs) + { + i->second = user_specified_max_dwarfs; + } int priority = labor_infos[l].priority(); @@ -2172,25 +2183,41 @@ void print_labor(df::unit_labor labor, color_ostream &out) out << labor_name << ": "; for (int i = 0; i < 20 - (int)labor_name.length(); i++) out << ' '; - out << "priority " << labor_infos[labor].priority() - << ", maximum " << labor_infos[labor].maximum_dwarfs() - << ", currently " << labor_infos[labor].active_dwarfs << " dwarfs (" - << labor_infos[labor].busy_dwarfs << " busy, " - << labor_infos[labor].idle_dwarfs << " idle)" + const auto& labor_info = labor_infos[labor]; + if (labor_info.is_disabled()) + { + out << "DISABLED"; + } + else + { + out << "priority " << labor_info.priority(); + + if (labor_info.maximum_dwarfs() == MAX_DWARFS_NONE) + out << ", no maximum"; + else + out << ", maximum " << labor_info.maximum_dwarfs(); + } + + out << ", currently " << labor_info.active_dwarfs << " dwarfs (" + << labor_info.busy_dwarfs << " busy, " + << labor_info.idle_dwarfs << " idle)" << endl; } -df::unit_labor lookup_labor_by_name(std::string& name) +df::unit_labor lookup_labor_by_name(std::string name) { - df::unit_labor labor = df::unit_labor::NONE; + // We should accept incorrect casing, there is no ambiguity. + std::transform(name.begin(), name.end(), name.begin(), ::toupper); FOR_ENUM_ITEMS(unit_labor, test_labor) { if (name == ENUM_KEY_STR(unit_labor, test_labor)) - labor = test_labor; + { + return test_labor; + } } - return labor; + return df::unit_labor::NONE; } DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) @@ -2250,7 +2277,9 @@ command_result labormanager(color_ostream &out, std::vector & para int v; if (parameters[2] == "none") - v = 0; + v = MAX_DWARFS_NONE; + else if (parameters[2] == "disable") + v = MAX_DWARFS_DISABLE; else v = atoi(parameters[2].c_str()); From 76b8f4af0ed59ac486a55e1c9e9acb3ab2875e3a Mon Sep 17 00:00:00 2001 From: billw2012 Date: Fri, 10 Aug 2018 21:25:40 +0100 Subject: [PATCH 2/4] Fixing tab --- plugins/labormanager/labormanager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/labormanager/labormanager.cpp b/plugins/labormanager/labormanager.cpp index 55cbc8c0e..d7a2f6f44 100644 --- a/plugins/labormanager/labormanager.cpp +++ b/plugins/labormanager/labormanager.cpp @@ -2197,8 +2197,7 @@ void print_labor(df::unit_labor labor, color_ostream &out) else out << ", maximum " << labor_info.maximum_dwarfs(); } - - out << ", currently " << labor_info.active_dwarfs << " dwarfs (" + out << ", currently " << labor_info.active_dwarfs << " dwarfs (" << labor_info.busy_dwarfs << " busy, " << labor_info.idle_dwarfs << " idle)" << endl; From 239d4a8c466286b76f572cf96243f49d75866f8d Mon Sep 17 00:00:00 2001 From: billw2012 Date: Sun, 26 Aug 2018 13:38:03 +0100 Subject: [PATCH 3/4] Attempt to full exclude disabled labors from all relevant calculations. --- plugins/labormanager/labormanager.cpp | 127 +++++++++++++++----------- 1 file changed, 73 insertions(+), 54 deletions(-) diff --git a/plugins/labormanager/labormanager.cpp b/plugins/labormanager/labormanager.cpp index d7a2f6f44..a3fd7db4a 100644 --- a/plugins/labormanager/labormanager.cpp +++ b/plugins/labormanager/labormanager.cpp @@ -1016,7 +1016,7 @@ private: df::unit_labor labor = labor_mapper->find_job_labor(j); - if (labor != df::unit_labor::NONE) + if (labor != df::unit_labor::NONE && !labor_infos[labor].is_disabled()) { labor_needed[labor]++; if (worker == -1) @@ -1143,7 +1143,7 @@ private: { df::item* item = *i; - if (item->flags.bits.dump) + if (item->flags.bits.dump && !labor_infos[df::unit_labor::HAUL_REFUSE].is_disabled()) labor_needed[df::unit_labor::HAUL_REFUSE]++; if (item->flags.whole & bad_flags.whole) @@ -1443,7 +1443,7 @@ private: FOR_ENUM_ITEMS(unit_labor, labor) { - if (labor == df::unit_labor::NONE) + if (labor == df::unit_labor::NONE || labor_infos[labor].is_disabled()) continue; df::job_skill skill = labor_to_skill[labor]; @@ -1463,7 +1463,7 @@ private: { FOR_ENUM_ITEMS(unit_labor, labor) { - if (labor == unit_labor::NONE) + if (labor == unit_labor::NONE || labor_infos[labor].is_disabled()) continue; if (Units::isValidLabor(dwarf->dwarf, labor)) set_labor(dwarf, labor, false); @@ -1707,67 +1707,79 @@ public: if (l == df::unit_labor::NONE) continue; - int before = labor_needed[l]; - - labor_needed[l] = max(0, labor_needed[l] - labor_in_use[l]); + if (!labor_infos[l].is_disabled()) + { + int before = labor_needed[l]; - if (default_labor_infos[l].tool != TOOL_NONE) - labor_needed[l] = std::min(labor_needed[l], tool_count[default_labor_infos[l].tool] - tool_in_use[default_labor_infos[l].tool]); + labor_needed[l] = max(0, labor_needed[l] - labor_in_use[l]); - if (print_debug && before != labor_needed[l]) - out.print("labor %s reduced from %d to %d\n", ENUM_KEY_STR(unit_labor, l).c_str(), before, labor_needed[l]); + if (default_labor_infos[l].tool != TOOL_NONE) + labor_needed[l] = std::min(labor_needed[l], tool_count[default_labor_infos[l].tool] - tool_in_use[default_labor_infos[l].tool]); + if (print_debug && before != labor_needed[l]) + out.print("labor %s reduced from %d to %d\n", ENUM_KEY_STR(unit_labor, l).c_str(), before, labor_needed[l]); + } + else + { + labor_needed[l] = 0; + } } /* assign food haulers for rotting food items */ - - if (priority_food > 0 && labor_infos[df::unit_labor::HAUL_FOOD].idle_dwarfs > 0) - priority_food = 1; - - if (print_debug) - out.print("priority food count = %d\n", priority_food); - - while (!available_dwarfs.empty() && priority_food > 0) + if (!labor_infos[df::unit_labor::HAUL_FOOD].is_disabled()) { - std::list::iterator bestdwarf = available_dwarfs.begin(); + if (priority_food > 0 && labor_infos[df::unit_labor::HAUL_FOOD].idle_dwarfs > 0) + priority_food = 1; - int best_score = INT_MIN; + if (print_debug) + out.print("priority food count = %d\n", priority_food); - for (std::list::iterator k = available_dwarfs.begin(); k != available_dwarfs.end(); k++) + while (!available_dwarfs.empty() && priority_food > 0) { - dwarf_info_t* d = (*k); + std::list::iterator bestdwarf = available_dwarfs.begin(); + + int best_score = INT_MIN; - if (Units::isValidLabor(d->dwarf, df::unit_labor::HAUL_FOOD)) + for (std::list::iterator k = available_dwarfs.begin(); k != available_dwarfs.end(); k++) { - int score = score_labor(d, df::unit_labor::HAUL_FOOD); + dwarf_info_t* d = (*k); - if (score > best_score) + if (Units::isValidLabor(d->dwarf, df::unit_labor::HAUL_FOOD)) { - bestdwarf = k; - best_score = score; + int score = score_labor(d, df::unit_labor::HAUL_FOOD); + + if (score > best_score) + { + bestdwarf = k; + best_score = score; + } } } - } - if (best_score > INT_MIN) - { - if (print_debug) - out.print("LABORMANAGER: assign \"%s\" labor %s score=%d (priority food)\n", (*bestdwarf)->dwarf->name.first_name.c_str(), ENUM_KEY_STR(unit_labor, df::unit_labor::HAUL_FOOD).c_str(), best_score); - - FOR_ENUM_ITEMS(unit_labor, l) + if (best_score > INT_MIN) { - if (l == df::unit_labor::NONE) - continue; - if (Units::isValidLabor((*bestdwarf)->dwarf, l)) - set_labor(*bestdwarf, l, l == df::unit_labor::HAUL_FOOD); + if (print_debug) + out.print("LABORMANAGER: assign \"%s\" labor %s score=%d (priority food)\n", (*bestdwarf)->dwarf->name.first_name.c_str(), ENUM_KEY_STR(unit_labor, df::unit_labor::HAUL_FOOD).c_str(), best_score); + + FOR_ENUM_ITEMS(unit_labor, l) + { + if (l == df::unit_labor::NONE) + continue; + if (Units::isValidLabor((*bestdwarf)->dwarf, l)) + set_labor(*bestdwarf, l, l == df::unit_labor::HAUL_FOOD); + } + + available_dwarfs.erase(bestdwarf); + priority_food--; } + else + break; - available_dwarfs.erase(bestdwarf); - priority_food--; } - else - break; - + } + else + { + priority_food = 0; } if (print_debug) @@ -1786,12 +1798,11 @@ public: for (auto i = labor_needed.begin(); i != labor_needed.end(); i++) { df::unit_labor l = i->first; - if (l == df::unit_labor::NONE) + if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) continue; const int user_specified_max_dwarfs = labor_infos[l].maximum_dwarfs(); - // Allow values less than 0, they will disable this labor. if (user_specified_max_dwarfs != MAX_DWARFS_NONE && i->second > user_specified_max_dwarfs) { i->second = user_specified_max_dwarfs; @@ -1951,7 +1962,7 @@ public: FOR_ENUM_ITEMS(unit_labor, l) { - if (l == df::unit_labor::NONE) + if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) continue; if (l == (*d)->using_labor) continue; @@ -2002,12 +2013,17 @@ public: } /* Also set the canary to remove constructions, because we have no way yet to tell if there are constructions needing removal */ - - set_labor(canary_dwarf, df::unit_labor::REMOVE_CONSTRUCTION, true); + if (!labor_infos[df::unit_labor::REMOVE_CONSTRUCTION].is_disabled()) + { + set_labor(canary_dwarf, df::unit_labor::REMOVE_CONSTRUCTION, true); + } /* Set HAUL_WATER so we can detect ponds that need to be filled ponds. */ - set_labor(canary_dwarf, df::unit_labor::HAUL_WATER, true); + if (!labor_infos[df::unit_labor::HAUL_WATER].is_disabled()) + { + set_labor(canary_dwarf, df::unit_labor::HAUL_WATER, true); + } if (print_debug) out.print("Setting %s as the hauling canary\n", canary_dwarf->dwarf->name.first_name.c_str()); @@ -2027,7 +2043,7 @@ public: { FOR_ENUM_ITEMS(unit_labor, l) { - if (l == df::unit_labor::NONE) + if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) continue; if (Units::isValidLabor((*d)->dwarf, l)) @@ -2059,13 +2075,16 @@ public: } } - set_labor(*d, df::unit_labor::PULL_LEVER, true); + if (!labor_infos[df::unit_labor::PULL_LEVER].is_disabled()) + { + set_labor(*d, df::unit_labor::PULL_LEVER, true); + } if (any) continue; FOR_ENUM_ITEMS(unit_labor, l) { - if (l == df::unit_labor::NONE) + if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) continue; if (to_assign[l] > 0 || l == df::unit_labor::CLEAN) @@ -2086,7 +2105,7 @@ public: FOR_ENUM_ITEMS(unit_labor, l) { - if (l == df::unit_labor::NONE) + if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) continue; tools_enum t = default_labor_infos[l].tool; From fefef2e121698fdb672a911cbffd7d13976fc3d8 Mon Sep 17 00:00:00 2001 From: billw2012 Date: Fri, 31 Aug 2018 20:53:06 +0100 Subject: [PATCH 4/4] Deprioritize dwarves with unmanged labors assigned, some renaming from disabled to unmanaged. --- plugins/labormanager/labormanager.cpp | 62 ++++++++++++++++----------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/plugins/labormanager/labormanager.cpp b/plugins/labormanager/labormanager.cpp index a3fd7db4a..419432870 100644 --- a/plugins/labormanager/labormanager.cpp +++ b/plugins/labormanager/labormanager.cpp @@ -103,7 +103,7 @@ enum ConfigFlags { // Value of 0 for max dwarfs means uncapped. const int MAX_DWARFS_NONE = 0; // Value < 0 for max dwarfs means don't manager the labor. -const int MAX_DWARFS_DISABLE = -1; +const int MAX_DWARFS_UNMANAGED = -1; // Here go all the command declarations... @@ -398,7 +398,7 @@ struct labor_info int priority() const { return config.ival(1); } void set_priority(int priority) { config.ival(1) = priority; } - bool is_disabled() const { return maximum_dwarfs() == MAX_DWARFS_DISABLE; } + bool is_unmanaged() const { return maximum_dwarfs() == MAX_DWARFS_UNMANAGED; } int maximum_dwarfs() const { return config.ival(2); } void set_maximum_dwarfs(int maximum_dwarfs) { config.ival(2) = maximum_dwarfs; } @@ -530,10 +530,12 @@ struct dwarf_info_t bool has_children; bool armed; + int unmanaged_labors_assigned; + df::unit_labor using_labor; dwarf_info_t(df::unit* dw) : dwarf(dw), state(OTHER), - clear_all(false), high_skill(0), has_children(false), armed(false), using_labor(df::unit_labor::NONE) + clear_all(false), high_skill(0), has_children(false), armed(false), using_labor(df::unit_labor::NONE), unmanaged_labors_assigned(0) { for (int e = TOOL_NONE; e < TOOLS_MAX; e++) has_tool[e] = false; @@ -847,8 +849,11 @@ DFhackCExport command_result plugin_init(color_ostream &out, std::vector \n" " Set max number of dwarves assigned to a labor.\n" + " labormanager max unmanaged\n" " labormanager max disable\n" - " Don't attempt to assign any dwarves to a labor.\n" + " Don't attempt to manage this labor.\n" + " Any dwarves with unmanaged labors assigned will be less\n" + " likely to have managed labors assigned to them.\n" " labormanager max none\n" " Unrestrict the number of dwarves assigned to a labor.\n" " labormanager priority \n" @@ -865,8 +870,8 @@ DFhackCExport command_result plugin_init(color_ostream &out, std::vector = 0 && labor <= ENUM_LAST_ITEM(unit_labor) && !labor_infos[labor].is_disabled()) + if (labor >= 0 && labor <= ENUM_LAST_ITEM(unit_labor) && !labor_infos[labor].is_unmanaged()) { if (!Units::isValidLabor(dwarf->dwarf, labor)) { @@ -1016,7 +1021,7 @@ private: df::unit_labor labor = labor_mapper->find_job_labor(j); - if (labor != df::unit_labor::NONE && !labor_infos[labor].is_disabled()) + if (labor != df::unit_labor::NONE && !labor_infos[labor].is_unmanaged()) { labor_needed[labor]++; if (worker == -1) @@ -1143,7 +1148,7 @@ private: { df::item* item = *i; - if (item->flags.bits.dump && !labor_infos[df::unit_labor::HAUL_REFUSE].is_disabled()) + if (item->flags.bits.dump && !labor_infos[df::unit_labor::HAUL_REFUSE].is_unmanaged()) labor_needed[df::unit_labor::HAUL_REFUSE]++; if (item->flags.whole & bad_flags.whole) @@ -1389,6 +1394,8 @@ private: dwarf->state = state; + dwarf->unmanaged_labors_assigned = 0; + FOR_ENUM_ITEMS(unit_labor, l) { if (l == df::unit_labor::NONE) @@ -1396,6 +1403,8 @@ private: if (dwarf->dwarf->status.labors[l]) if (state == IDLE) labor_infos[l].idle_dwarfs++; + if (labor_infos[l].is_unmanaged()) + dwarf->unmanaged_labors_assigned++; } @@ -1443,7 +1452,7 @@ private: FOR_ENUM_ITEMS(unit_labor, labor) { - if (labor == df::unit_labor::NONE || labor_infos[labor].is_disabled()) + if (labor == df::unit_labor::NONE || labor_infos[labor].is_unmanaged()) continue; df::job_skill skill = labor_to_skill[labor]; @@ -1463,7 +1472,7 @@ private: { FOR_ENUM_ITEMS(unit_labor, labor) { - if (labor == unit_labor::NONE || labor_infos[labor].is_disabled()) + if (labor == unit_labor::NONE || labor_infos[labor].is_unmanaged()) continue; if (Units::isValidLabor(dwarf->dwarf, labor)) set_labor(dwarf, labor, false); @@ -1579,6 +1588,9 @@ private: score -= Units::computeMovementSpeed(d->dwarf); + // significantly disfavor dwarves who have unmanaged labors assigned + score -= 1000 * d->unmanaged_labors_assigned; + return score; } @@ -1707,7 +1719,7 @@ public: if (l == df::unit_labor::NONE) continue; - if (!labor_infos[l].is_disabled()) + if (!labor_infos[l].is_unmanaged()) { int before = labor_needed[l]; @@ -1726,7 +1738,7 @@ public: } /* assign food haulers for rotting food items */ - if (!labor_infos[df::unit_labor::HAUL_FOOD].is_disabled()) + if (!labor_infos[df::unit_labor::HAUL_FOOD].is_unmanaged()) { if (priority_food > 0 && labor_infos[df::unit_labor::HAUL_FOOD].idle_dwarfs > 0) priority_food = 1; @@ -1798,7 +1810,7 @@ public: for (auto i = labor_needed.begin(); i != labor_needed.end(); i++) { df::unit_labor l = i->first; - if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) + if (l == df::unit_labor::NONE || labor_infos[l].is_unmanaged()) continue; const int user_specified_max_dwarfs = labor_infos[l].maximum_dwarfs(); @@ -1962,7 +1974,7 @@ public: FOR_ENUM_ITEMS(unit_labor, l) { - if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) + if (l == df::unit_labor::NONE || labor_infos[l].is_unmanaged()) continue; if (l == (*d)->using_labor) continue; @@ -2013,14 +2025,14 @@ public: } /* Also set the canary to remove constructions, because we have no way yet to tell if there are constructions needing removal */ - if (!labor_infos[df::unit_labor::REMOVE_CONSTRUCTION].is_disabled()) + if (!labor_infos[df::unit_labor::REMOVE_CONSTRUCTION].is_unmanaged()) { set_labor(canary_dwarf, df::unit_labor::REMOVE_CONSTRUCTION, true); } /* Set HAUL_WATER so we can detect ponds that need to be filled ponds. */ - if (!labor_infos[df::unit_labor::HAUL_WATER].is_disabled()) + if (!labor_infos[df::unit_labor::HAUL_WATER].is_unmanaged()) { set_labor(canary_dwarf, df::unit_labor::HAUL_WATER, true); } @@ -2043,7 +2055,7 @@ public: { FOR_ENUM_ITEMS(unit_labor, l) { - if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) + if (l == df::unit_labor::NONE || labor_infos[l].is_unmanaged()) continue; if (Units::isValidLabor((*d)->dwarf, l)) @@ -2075,7 +2087,7 @@ public: } } - if (!labor_infos[df::unit_labor::PULL_LEVER].is_disabled()) + if (!labor_infos[df::unit_labor::PULL_LEVER].is_unmanaged()) { set_labor(*d, df::unit_labor::PULL_LEVER, true); } @@ -2084,7 +2096,7 @@ public: FOR_ENUM_ITEMS(unit_labor, l) { - if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) + if (l == df::unit_labor::NONE || labor_infos[l].is_unmanaged()) continue; if (to_assign[l] > 0 || l == df::unit_labor::CLEAN) @@ -2105,7 +2117,7 @@ public: FOR_ENUM_ITEMS(unit_labor, l) { - if (l == df::unit_labor::NONE || labor_infos[l].is_disabled()) + if (l == df::unit_labor::NONE || labor_infos[l].is_unmanaged()) continue; tools_enum t = default_labor_infos[l].tool; @@ -2203,9 +2215,9 @@ void print_labor(df::unit_labor labor, color_ostream &out) for (int i = 0; i < 20 - (int)labor_name.length(); i++) out << ' '; const auto& labor_info = labor_infos[labor]; - if (labor_info.is_disabled()) + if (labor_info.is_unmanaged()) { - out << "DISABLED"; + out << "UNMANAGED"; } else { @@ -2296,8 +2308,8 @@ command_result labormanager(color_ostream &out, std::vector & para if (parameters[2] == "none") v = MAX_DWARFS_NONE; - else if (parameters[2] == "disable") - v = MAX_DWARFS_DISABLE; + else if (parameters[2] == "disable" || parameters[2] == "unmanaged") + v = MAX_DWARFS_UNMANAGED; else v = atoi(parameters[2].c_str());