On Tue, Dec 2, 2014 at 1:18 PM, Lennart Poettering <lenn...@poettering.net> wrote: > On Tue, 02.12.14 01:50, Tom Gundersen (tome...@kemper.freedesktop.org) wrote: > >> >> +/* IEEE Organizationally Unique Identifier vendor string */ >> +static int ieee_oui(struct udev_hwdb *hwdb, struct ether_addr *mac, char >> **ret) { >> + struct udev_list_entry *entry; >> + char *description; >> + char str[32]; > > Shouldnt this be "4 + 6*2 + 1"? > >> + >> + /* skip commonly misused 00:00:00 (Xerox) prefix */ >> + if (memcmp(mac, "\0\0\0", 3) == 0) >> + return -EINVAL; >> + >> + snprintf(str, sizeof(str), "OUI:%02X%02X%02X%02X%02X%02X", >> mac->ether_addr_octet[0], mac->ether_addr_octet[1], mac->ether_addr_octet[2], >> + >> mac->ether_addr_octet[3], mac->ether_addr_octet[4], >> mac->ether_addr_octet[5]); >> + > > Hmm, maybe we should have a new set of macros for this, similar to > SD_ID128_FORMAT_STR and SD_ID128_FORMAT_VAL?
Fixed both these now. Thanks! Tom _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel