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 uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/19041 ) Change subject: introduce notion of 'driver' ...................................................................... introduce notion of 'driver' Change-Id: Ic168e25f2622b397bac2c133ec35f4a0a38f859b --- M src/e1d.h M src/intf_line.c M src/usb.c M src/vty.c 4 files changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/41/19041/1 diff --git a/src/e1d.h b/src/e1d.h index ed5414b..e93d0e5 100644 --- a/src/e1d.h +++ b/src/e1d.h @@ -65,12 +65,19 @@ struct e1_ts ts[32]; }; +enum e1_driver { + E1_DRIVER_USB, +}; + +extern const struct value_string e1_driver_names[]; + struct e1_intf { struct llist_head list; struct e1_daemon *e1d; uint8_t id; + enum e1_driver drv; void *drv_data; struct llist_head lines; diff --git a/src/intf_line.c b/src/intf_line.c index a2a623a..83e629f 100644 --- a/src/intf_line.c +++ b/src/intf_line.c @@ -34,6 +34,10 @@ #include "e1d.h" #include "log.h" +const struct value_string e1_driver_names[] = { + { E1_DRIVER_USB, "usb" }, + { 0, NULL } +}; // --------------------------------------------------------------------------- // e1d structures diff --git a/src/usb.c b/src/usb.c index f35f548..8938a78 100644 --- a/src/usb.c +++ b/src/usb.c @@ -366,6 +366,7 @@ intf_data->devh = devh; intf = _e1_intf_new(e1d, intf_data); + intf->drv = E1_DRIVER_USB; ret = libusb_get_active_config_descriptor(dev, &cd); if (ret) { diff --git a/src/vty.c b/src/vty.c index 2c7fa81..753a8ad 100644 --- a/src/vty.c +++ b/src/vty.c @@ -49,7 +49,8 @@ static void vty_dump_intf(struct vty *vty, const struct e1_intf *intf) { - vty_out(vty, "Interface #%u, Driver: FIXME%s", intf->id, VTY_NEWLINE); + vty_out(vty, "Interface #%u, Driver: %s%s", intf->id, + get_value_string(e1_driver_names, intf->drv), VTY_NEWLINE); } DEFUN(show_intf, show_intf_cmd, "show interface [<0-255>]", -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/19041 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: Ic168e25f2622b397bac2c133ec35f4a0a38f859b Gerrit-Change-Number: 19041 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200629/f5ece49a/attachment.htm>