This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/19841 ) Change subject: macaddr: fix osmo_macaddr_parse(): return meaningful error codes ...................................................................... macaddr: fix osmo_macaddr_parse(): return meaningful error codes Change-Id: I316deb83979198acc26721d29708d9942174b192 --- M src/macaddr.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/macaddr.c b/src/macaddr.c index a9138f8..56fdf86 100644 --- a/src/macaddr.c +++ b/src/macaddr.c @@ -34,6 +34,7 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> +#include <errno.h> /*! Parse a MAC address from human-readable notation * This function parses an ethernet MAC address in the commonly-used @@ -77,11 +78,11 @@ */ int osmo_get_macaddr(uint8_t *mac_out, const char *dev_name) { - int rc = -1; struct ifaddrs *ifa, *ifaddr; + int rc = -ENODEV; if (getifaddrs(&ifaddr) != 0) - return -1; + return -errno; for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { struct sockaddr_dl *sdl; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/19841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I316deb83979198acc26721d29708d9942174b192 Gerrit-Change-Number: 19841 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200827/43ca0c51/attachment.htm>