Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
systemd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
steam
systemd
Commits
76bf48b7
Commit
76bf48b7
authored
Sep 23, 2010
by
Lennart Poettering
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbus: export number of total failed jobs on D-Bus interface
parent
22be093f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
src/dbus-manager.c
src/dbus-manager.c
+2
-0
src/job.c
src/job.c
+5
-1
src/manager.h
src/manager.h
+1
-0
No files found.
src/dbus-manager.c
View file @
76bf48b7
...
...
@@ -133,6 +133,7 @@
" <property name=\"NNames\" type=\"u\" access=\"read\"/>\n" \
" <property name=\"NJobs\" type=\"u\" access=\"read\"/>\n" \
" <property name=\"NInstalledJobs\" type=\"u\" access=\"read\"/>\n" \
" <property name=\"NFailedJobs\" type=\"u\" access=\"read\"/>\n" \
" <property name=\"Progress\" type=\"d\" access=\"read\"/>\n" \
" <property name=\"Environment\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"ConfirmSpawn\" type=\"b\" access=\"read\"/>\n" \
...
...
@@ -267,6 +268,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
{
"org.freedesktop.systemd1.Manager"
,
"NNames"
,
bus_manager_append_n_names
,
"u"
,
NULL
},
{
"org.freedesktop.systemd1.Manager"
,
"NJobs"
,
bus_manager_append_n_jobs
,
"u"
,
NULL
},
{
"org.freedesktop.systemd1.Manager"
,
"NInstalledJobs"
,
bus_property_append_uint32
,
"u"
,
&
m
->
n_installed_jobs
},
{
"org.freedesktop.systemd1.Manager"
,
"NFailedJobs"
,
bus_property_append_uint32
,
"u"
,
&
m
->
n_failed_jobs
},
{
"org.freedesktop.systemd1.Manager"
,
"Progress"
,
bus_manager_append_progress
,
"d"
,
NULL
},
{
"org.freedesktop.systemd1.Manager"
,
"Environment"
,
bus_property_append_strv
,
"as"
,
m
->
environment
},
{
"org.freedesktop.systemd1.Manager"
,
"ConfirmSpawn"
,
bus_property_append_bool
,
"b"
,
&
m
->
confirm_spawn
},
...
...
src/job.c
View file @
76bf48b7
...
...
@@ -478,9 +478,13 @@ int job_finish_and_invalidate(Job *j, bool success) {
return
0
;
}
j
->
failed
=
!
success
;
log_debug
(
"Job %s/%s finished, success=%s"
,
j
->
unit
->
meta
.
id
,
job_type_to_string
(
j
->
type
),
yes_no
(
success
));
j
->
failed
=
!
success
;
if
(
j
->
failed
)
j
->
manager
->
n_failed_jobs
++
;
u
=
j
->
unit
;
t
=
j
->
type
;
job_free
(
j
);
...
...
src/manager.h
View file @
76bf48b7
...
...
@@ -210,6 +210,7 @@ struct Manager {
int
n_deserializing
;
unsigned
n_installed_jobs
;
unsigned
n_failed_jobs
;
};
int
manager_new
(
ManagerRunningAs
running_as
,
Manager
**
m
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment