[systemd-commits] 2 commits - NEWS TODO src/shared
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Oct 23 08:13:32 PDT 2012
NEWS | 2 +-
TODO | 6 +++++-
src/shared/cgroup-show.c | 9 +++++----
3 files changed, 11 insertions(+), 6 deletions(-)
New commits:
commit 1cb88f2c61f590083847d65cd5a518e834da87d3
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Oct 23 17:13:01 2012 +0200
update TODO
diff --git a/NEWS b/NEWS
index 1914064..bb5b887 100644
--- a/NEWS
+++ b/NEWS
@@ -57,7 +57,7 @@ CHANGES WITH 195:
* gatewayd/journalctl now supports HTML5/JSON
Server-Sent-Events as output.
- * The SysV init script compatibility logic will no
+ * The SysV init script compatibility logic will now
heuristically determine whether a script supports the
"reload" verb, and only then make this available as
"systemctl reload".
diff --git a/TODO b/TODO
index 9152364..39f6dd1 100644
--- a/TODO
+++ b/TODO
@@ -19,7 +19,11 @@ F18:
Features:
-* add --unit to systemctl switch-root somehow
+* If we show an error about a unit (such as not showing up) and it has no Description string, then show a description string generated form the reverse of unit_name_mangle().
+
+* fedup: add --unit to systemctl switch-root somehow
+* fedup: don't delete initrd on switch-root
+* fedup: generator
* journalctl/gatewayd: GELF output
commit 4278aa278cf05158c874cf9f28f45a1f60413ee6
Author: Mantas MikulÄnas <grawity at gmail.com>
Date: Fri Oct 19 20:15:25 2012 +0300
cgls: correctly ellipsize command lines for PIDs >= 1000000
diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c
index 9003a12..2ffed8b 100644
--- a/src/shared/cgroup-show.c
+++ b/src/shared/cgroup-show.c
@@ -52,7 +52,7 @@ static unsigned ilog10(unsigned long ul) {
}
static void show_pid_array(int pids[], unsigned n_pids, const char *prefix, unsigned n_columns, bool extra, bool more, bool kernel_threads) {
- unsigned i, m;
+ unsigned i, m, pid_width;
pid_t biggest = 0;
/* Filter duplicates */
@@ -71,12 +71,13 @@ static void show_pid_array(int pids[], unsigned n_pids, const char *prefix, unsi
pids[m++] = pids[i];
}
n_pids = m;
+ pid_width = ilog10(biggest);
/* And sort */
qsort(pids, n_pids, sizeof(pid_t), compare);
- if (n_columns > 8)
- n_columns -= 8;
+ if (n_columns > pid_width+2)
+ n_columns -= pid_width+2;
else
n_columns = 20;
@@ -88,7 +89,7 @@ static void show_pid_array(int pids[], unsigned n_pids, const char *prefix, unsi
printf("%s%s %*lu %s\n",
prefix,
extra ? "\342\200\243" : ((more || i < n_pids-1) ? "\342\224\234" : "\342\224\224"),
- (int) ilog10(biggest),
+ pid_width,
(unsigned long) pids[i],
strna(t));
More information about the systemd-commits
mailing list