From e409f87570a87009d023e1ba97263445241b84d3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 21 Sep 2010 03:51:31 +0200 Subject: [PATCH] manager: count how many jobs we executed --- src/dbus-manager.c | 2 ++ src/manager.c | 1 + src/manager.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/dbus-manager.c b/src/dbus-manager.c index cffa5476..fb10bd4f 100644 --- a/src/dbus-manager.c +++ b/src/dbus-manager.c @@ -132,6 +132,7 @@ " \n" \ " \n" \ " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ @@ -245,6 +246,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection, { "org.freedesktop.systemd1.Manager", "LogTarget", bus_manager_append_log_target, "s", NULL }, { "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", "Environment", bus_property_append_strv, "as", m->environment }, { "org.freedesktop.systemd1.Manager", "ConfirmSpawn", bus_property_append_bool, "b", &m->confirm_spawn }, { "org.freedesktop.systemd1.Manager", "ShowStatus", bus_property_append_bool, "b", &m->show_status }, diff --git a/src/manager.c b/src/manager.c index 27c8aa4c..31dd44ca 100644 --- a/src/manager.c +++ b/src/manager.c @@ -1182,6 +1182,7 @@ static int transaction_apply(Manager *m) { j->unit->meta.job = j; j->installed = true; + m->n_installed_jobs ++; /* We're fully installed. Now let's free data we don't * need anymore. */ diff --git a/src/manager.h b/src/manager.h index 44553723..a137eb7c 100644 --- a/src/manager.h +++ b/src/manager.h @@ -207,6 +207,8 @@ struct Manager { bool swap_auto; int n_deserializing; + + unsigned n_installed_jobs; }; int manager_new(ManagerRunningAs running_as, Manager **m); -- 2.39.5