X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fudev%2Fudev-builtin-net_id.c;h=e6db2e4798871da81cfc6458843c87dc0748d2ac;hp=97dba3a52a98f768b30350f7145079811c43795a;hb=971e7fb62548f2c9c4e32684bb13409e6579dc6a;hpb=ad37f393fa97f4274cc3bf97a0d8c388a429037e diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index 97dba3a52..e6db2e479 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -40,10 +40,10 @@ * All multi-function PCI devices will carry the [f] number in the * device name, including the function 0 device. * - * For USB devices the fill chain of port numbers of hubs is composed. If the - * string would gt longer than the maximum of 15 characters, the name is not - * exported. The usual USB configuration == 1 and interface == 0 values are - * suppressed. + * For USB devices the full chain of port numbers of hubs is composed. If the + * name gets longer than the maximum number of 15 characters, the name is not + * exported. + * The usual USB configuration == 1 and interface == 0 values are suppressed. * * PCI ethernet card with firmware index * ID_NET_NAME_ONBOARD=eno1 @@ -330,9 +330,9 @@ static int names_mac(struct udev_device *dev, struct netnames *names) { /* IEEE Organizationally Unique Identifier vendor string */ static int ieee_oui(struct udev_device *dev, struct netnames *names, bool test) { - char str[IFNAMSIZ]; + char str[32]; - if (names->mac_valid) + if (!names->mac_valid) return -ENOENT; /* skip commonly misused 00:00:00 (Xerox) prefix */ if (memcmp(names->mac, "\0\0\0", 3) == 0)