]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Make comment about coordinating offline and online installation symmetric
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Oct 2022 08:32:46 +0000 (10:32 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Oct 2022 10:28:00 +0000 (12:28 +0200)
https://github.com/systemd/systemd/pull/24728#issuecomment-1260966910

src/core/dbus-manager.c
src/shared/install.c

index a6b3c7b36b985ce1531a3ef7e83fd2d7b38c2201..bdbaa9b58c62f49934404ea40c57aaf3ef188559 100644 (file)
@@ -2133,8 +2133,6 @@ static int send_unit_files_changed(sd_bus *bus, void *userdata) {
 /* Create an error reply, using the error information from changes[]
  * if possible, and fall back to generating an error from error code c.
  * The error message only describes the first error.
- *
- * Coordinate with install_changes_dump() in install.c.
  */
 static int install_error(
                 sd_bus_error *error,
@@ -2146,8 +2144,9 @@ static int install_error(
 
         for (size_t i = 0; i < n_changes; i++)
 
-                switch (changes[i].type) {
+                /* When making changes here, make sure to also change install_changes_dump() in install.c. */
 
+                switch (changes[i].type) {
                 case 0 ... _INSTALL_CHANGE_TYPE_MAX: /* not errors */
                         break;
 
index 53b5aefbe6ccb8638df2d28f2376b65b989dcf77..4cc0b67b8b477f826462307ec35e098b62cf0c15 100644 (file)
@@ -332,6 +332,8 @@ void install_changes_dump(int r, const char *verb, const InstallChange *changes,
         for (size_t i = 0; i < n_changes; i++) {
                 assert(verb || changes[i].type >= 0);
 
+                /* When making changes here, make sure to also change install_error() in dbus-manager.c. */
+
                 switch (changes[i].type) {
                 case INSTALL_CHANGE_SYMLINK:
                         if (!quiet)