]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/device: add comments for boolean arguments 23508/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Aug 2022 13:16:58 +0000 (22:16 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Aug 2022 13:16:58 +0000 (22:16 +0900)
src/core/device.c

index e6f41588e875fd8864e7b46a87e401f3bd49006a..4f9bf24db88ffdaca8d4d0d99893ac0c2e20e92b 100644 (file)
@@ -826,12 +826,12 @@ static void device_process_new(Manager *m, sd_device *dev, const char *sysfs) {
         /* Add the main unit named after the sysfs path. If this one fails, don't bother with the rest, as
          * this one shall be the main device unit the others just follow. (Compare with how
          * device_following() is implemented, see below, which looks for the sysfs device.) */
-        if (device_setup_unit(m, dev, sysfs, true) < 0)
+        if (device_setup_unit(m, dev, sysfs, /* main = */ true) < 0)
                 return;
 
         /* Add an additional unit for the device node */
         if (sd_device_get_devname(dev, &dn) >= 0)
-                (void) device_setup_unit(m, dev, dn, false);
+                (void) device_setup_unit(m, dev, dn, /* main = */ false);
 
         /* Add additional units for all explicitly configured aliases */
         r = sd_device_get_property_value(dev, "SYSTEMD_ALIAS", &alias);
@@ -857,7 +857,7 @@ static void device_process_new(Manager *m, sd_device *dev, const char *sysfs) {
                 else if (!path_is_normalized(word))
                         log_device_warning(dev, "SYSTEMD_ALIAS is not a normalized path, ignoring: %s", word);
                 else
-                        (void) device_setup_unit(m, dev, word, false);
+                        (void) device_setup_unit(m, dev, word, /* main = */ false);
         }
 }
 
@@ -1188,7 +1188,7 @@ void device_found_node(Manager *m, const char *node, DeviceFound found, DeviceFo
                         return;
                 }
 
-                (void) device_setup_unit(m, dev, node, false); /* 'dev' may be NULL. */
+                (void) device_setup_unit(m, dev, node, /* main = */ false); /* 'dev' may be NULL. */
         }
 
         /* Update the device unit's state, should it exist */