diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-04-19 17:21:18 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-04-19 17:21:18 +0200 |
commit | 0c1792efe422622c3c8a11b70a722147304da4cb (patch) | |
tree | 56aa22070f066ff3636625b2e0a70f7ced73450a /src/shared/bus-util.c | |
parent | 0c7739039b090a2c1f8c894c0e6eb75fc25663a0 (diff) | |
parent | 5cfde70c6e7c8afcd2c9cdb3505301c3e6cde6da (diff) |
Merge pull request #3055 from keszybz/preset-fixes
Another bunch of improvements to the installation code
Diffstat (limited to 'src/shared/bus-util.c')
-rw-r--r-- | src/shared/bus-util.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index 677970b7f0..6a1877d8aa 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -2200,20 +2200,16 @@ int bus_deserialize_and_dump_unit_file_changes(sd_bus_message *m, bool quiet, Un return bus_log_parse_error(r); while ((r = sd_bus_message_read(m, "(sss)", &type, &path, &source)) > 0) { - if (!quiet) { - if (streq(type, "symlink")) - log_info("Created symlink from %s to %s.", path, source); - else if (streq(type, "unlink")) - log_info("Removed symlink %s.", path); - else if (streq(type, "masked")) - log_info("Unit %s is masked, ignoring.", path); - else - log_notice("Manager reported unknown change type \"%s\" for %s.", type, path); + /* We expect only "success" changes to be sent over the bus. + Hence, reject anything negative. */ + UnitFileChangeType ch = unit_file_change_type_from_string(type); + + if (ch < 0) { + log_notice("Manager reported unknown change type \"%s\" for path \"%s\", ignoring.", type, path); + continue; } - r = unit_file_changes_add(changes, n_changes, - unit_file_change_type_from_string(type), - path, source); + r = unit_file_changes_add(changes, n_changes, ch, path, source); if (r < 0) return r; } @@ -2224,6 +2220,7 @@ int bus_deserialize_and_dump_unit_file_changes(sd_bus_message *m, bool quiet, Un if (r < 0) return bus_log_parse_error(r); + unit_file_dump_changes(0, NULL, *changes, *n_changes, false); return 0; } |