From: Yu Watanabe Date: Fri, 5 Aug 2022 13:16:58 +0000 (+0900) Subject: core/device: add comments for boolean arguments X-Git-Tag: v252-rc1~506^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F23508%2Fhead;p=thirdparty%2Fsystemd.git core/device: add comments for boolean arguments --- diff --git a/src/core/device.c b/src/core/device.c index e6f41588e87..4f9bf24db88 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -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 */