summaryrefslogtreecommitdiff
path: root/src/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-08 21:01:42 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-08 21:01:42 +0200
commitfa776d8e962da9d90459e2f3e86a2a0c6366ee12 (patch)
treec75cc3cb9343a53d55741983c317ee8d414f8f0a /src/systemctl.c
parentab35fb1bc68625c891a19a66473a9c40ca12e69d (diff)
cgls: beef up control group dumping and introduce cgls tool
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index bb831adb5c..a9a975ee81 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -110,30 +110,6 @@ static int bus_iter_get_basic_and_next(DBusMessageIter *iter, int type, void *da
return 0;
}
-static int columns(void) {
- static int parsed_columns = 0;
- const char *e;
-
- if (parsed_columns > 0)
- return parsed_columns;
-
- if ((e = getenv("COLUMNS")))
- parsed_columns = atoi(e);
-
- if (parsed_columns <= 0) {
- struct winsize ws;
- zero(ws);
-
- if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) >= 0)
- parsed_columns = ws.ws_col;
- }
-
- if (parsed_columns <= 0)
- parsed_columns = 80;
-
- return parsed_columns;
-}
-
static void warn_wall(enum action action) {
static const char *table[_ACTION_MAX] = {
[ACTION_HALT] = "The system is going down for system halt NOW!",
@@ -1076,7 +1052,7 @@ static void print_status_info(UnitStatusInfo *i) {
else
c = 0;
- show_cgroup(i->default_control_group, "\t\t ", c);
+ show_cgroup_recursive(i->default_control_group, "\t\t ", c);
}
}
@@ -3068,7 +3044,7 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[]) {
{ "reboot", EQUAL, 1, start_special },
{ "default", EQUAL, 1, start_special },
{ "rescue", EQUAL, 1, start_special },
- { "emergency", EQUAL, 1, start_special },
+ { "emergency", EQUAL, 1, start_special }
};
int left;