Skip to content

Commit 8f52f91

Browse files
author
David Sommerseth
committed
Renamed get_interface_info() to get_interfaces_info() and updated help string
This is to make it a bit clearer that the result type of this function always will be a list of ethtool.etherinfo objects.
1 parent 5efffc0 commit 8f52f91

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

python-ethtool/ethtool.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static PyObject *get_ipaddress(PyObject *self __unused, PyObject *args)
234234
*
235235
* @return Python list of objects on success, otherwise NULL.
236236
*/
237-
static PyObject *get_interface_info(PyObject *self __unused, PyObject *args) {
237+
static PyObject *get_interfaces_info(PyObject *self __unused, PyObject *args) {
238238
PyObject *devlist = NULL, *ethinf_py = NULL;
239239
PyObject *inargs = NULL;
240240
char **fetch_devs;
@@ -888,9 +888,11 @@ static struct PyMethodDef PyEthModuleMethods[] = {
888888
.ml_flags = METH_VARARGS,
889889
},
890890
{
891-
.ml_name = "get_interface_info",
892-
.ml_meth = (PyCFunction)get_interface_info,
891+
.ml_name = "get_interfaces_info",
892+
.ml_meth = (PyCFunction)get_interfaces_info,
893893
.ml_flags = METH_VARARGS,
894+
.ml_doc = "Accepts a string, list or tupples of interface names. "
895+
"Returns a list of ethtool.etherinfo objets with device information."
894896
},
895897
{
896898
.ml_name = "get_netmask",

0 commit comments

Comments
 (0)