From: Zbigniew Jędrzejewski-Szmek Date: Thu, 9 May 2019 10:35:20 +0000 (+0200) Subject: udev: fix various comments X-Git-Tag: v243-rc1~454^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c27f691a515e7a950324aadf313fa1475cdbca6;p=thirdparty%2Fsystemd.git udev: fix various comments In particular: "re-renaming" was just a copy-paste error. --- diff --git a/src/udev/net/naming-scheme.h b/src/udev/net/naming-scheme.h index 324b8e679c8..f27e1e0d3c3 100644 --- a/src/udev/net/naming-scheme.h +++ b/src/udev/net/naming-scheme.h @@ -25,9 +25,9 @@ typedef enum NamingSchemeFlags { NAMING_SR_IOV_V = 1 << 0, /* Use "v" suffix for SR-IOV, see 609948c7043a40008b8299529c978ed8e11de8f6*/ NAMING_NPAR_ARI = 1 << 1, /* Use NPAR "ARI", see 6bc04997b6eab35d1cb9fa73889892702c27be09 */ NAMING_INFINIBAND = 1 << 2, /* Use "ib" prefix for infiniband, see 938d30aa98df887797c9e05074a562ddacdcdf5e */ - NAMING_ZERO_ACPI_INDEX = 1 << 3, /* Allow zero acpi_index field, see d81186ef4f6a888a70f20a1e73a812d6acb9e22f */ + NAMING_ZERO_ACPI_INDEX = 1 << 3, /* Use zero acpi_index field, see d81186ef4f6a888a70f20a1e73a812d6acb9e22f */ NAMING_ALLOW_RERENAMES = 1 << 4, /* Allow re-renaming of devices, see #9006 */ - NAMING_NETDEVSIM = 1 << 5, /* Allow re-renaming of netdevsim devices */ + NAMING_NETDEVSIM = 1 << 5, /* Generate names for netdevsim devices, see eaa9d507d85509c8bf727356e3884ec54b0fc646 */ /* And now the masks that combine the features above */ NAMING_V238 = 0, diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index 4fcde34813f..8fa8ee3d5a9 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -170,7 +170,7 @@ static int dev_pci_onboard(sd_device *dev, struct netnames *names) { char *s; int r; - /* ACPI _DSM — device specific method for naming a PCI or PCI Express device */ + /* ACPI _DSM — device specific method for naming a PCI or PCI Express device */ if (sd_device_get_sysattr_value(names->pcidev, "acpi_index", &attr) < 0) { /* SMBIOS type 41 — Onboard Devices Extended Information */ r = sd_device_get_sysattr_value(names->pcidev, "index", &attr); @@ -184,10 +184,11 @@ static int dev_pci_onboard(sd_device *dev, struct netnames *names) { if (idx == 0 && !naming_scheme_has(NAMING_ZERO_ACPI_INDEX)) return -EINVAL; - /* Some BIOSes report rubbish indexes that are excessively high (2^24-1 is an index VMware likes to report for - * example). Let's define a cut-off where we don't consider the index reliable anymore. We pick some arbitrary - * cut-off, which is somewhere beyond the realistic number of physical network interface a system might - * have. Ideally the kernel would already filter his crap for us, but it doesn't currently. */ + /* Some BIOSes report rubbish indexes that are excessively high (2^24-1 is an index VMware likes to + * report for example). Let's define a cut-off where we don't consider the index reliable anymore. We + * pick some arbitrary cut-off, which is somewhere beyond the realistic number of physical network + * interface a system might have. Ideally the kernel would already filter his crap for us, but it + * doesn't currently. */ if (idx > ONBOARD_INDEX_MAX) return -ENOENT; @@ -643,9 +644,8 @@ static int names_ccw(sd_device *dev, struct netnames *names) { if (r < 0) return r; - /* Check the length of the bus-ID. Rely on that the kernel provides - * a correct bus-ID; alternatively, improve this check and parse and - * verify each bus-ID part... + /* Check the length of the bus-ID. Rely on the fact that the kernel provides a correct bus-ID; + * alternatively, improve this check and parse and verify each bus-ID part... */ bus_id_len = strlen(bus_id); if (!IN_SET(bus_id_len, 8, 9))