chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e2f3b44
)
systemctl: show process type along process exit codes
author
Lennart Poettering
<lennart@poettering.net>
Thu, 20 Jan 2011 12:24:24 +0000
(13:24 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 20 Jan 2011 12:24:24 +0000
(13:24 +0100)
src/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl.c
b/src/systemctl.c
index 2c8c2cf61d5165036beffe54ec8784a67dc0a2e1..f93f2aa480b043150254f4e3ed06ddeacc11f912 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-1615,6
+1615,8
@@
finish:
}
typedef struct ExecStatusInfo {
}
typedef struct ExecStatusInfo {
+ char *name;
+
char *path;
char **argv;
char *path;
char **argv;
@@
-1632,6
+1634,7
@@
typedef struct ExecStatusInfo {
static void exec_status_info_free(ExecStatusInfo *i) {
assert(i);
static void exec_status_info_free(ExecStatusInfo *i) {
assert(i);
+ free(i->name);
free(i->path);
strv_free(i->argv);
free(i);
free(i->path);
strv_free(i->argv);
free(i);
@@
-1850,7
+1853,7
@@
static void print_status_info(UnitStatusInfo *i) {
continue;
t = strv_join(p->argv, " ");
continue;
t = strv_join(p->argv, " ");
- printf("\t Process: %u
(%s, code=%s, ", p->pid
, strna(t), sigchld_code_to_string(p->code));
+ printf("\t Process: %u
%s=%s (code=%s, ", p->pid, p->name
, strna(t), sigchld_code_to_string(p->code));
free(t);
if (p->code == CLD_EXITED) {
free(t);
if (p->code == CLD_EXITED) {
@@
-2083,6
+2086,11
@@
static int status_property(const char *name, DBusMessageIter *iter, UnitStatusIn
if (!(info = new0(ExecStatusInfo, 1)))
return -ENOMEM;
if (!(info = new0(ExecStatusInfo, 1)))
return -ENOMEM;
+ if (!(info->name = strdup(name))) {
+ free(info);
+ return -ENOMEM;
+ }
+
if ((r = exec_status_info_deserialize(&sub, info)) < 0) {
free(info);
return r;
if ((r = exec_status_info_deserialize(&sub, info)) < 0) {
free(info);
return r;