summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2010-05-04 15:12:05 +0200
committerDavid Sommerseth <davids@redhat.com>2010-05-04 15:12:05 +0200
commit8f52f9132f8bda8491490618cc7792d393eb4fee (patch)
tree8ea1a59a0487eb7657c2d1110d4f8361919c9c8e
parent5efffc01353311b73625cc4731ef66333ed550de (diff)
downloadpython-ethtool-8f52f9132f8bda8491490618cc7792d393eb4fee.tar.gz
python-ethtool-8f52f9132f8bda8491490618cc7792d393eb4fee.tar.xz
python-ethtool-8f52f9132f8bda8491490618cc7792d393eb4fee.zip
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.
-rw-r--r--python-ethtool/ethtool.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/python-ethtool/ethtool.c b/python-ethtool/ethtool.c
index 85c4737..c6a9af4 100644
--- a/python-ethtool/ethtool.c
+++ b/python-ethtool/ethtool.c
@@ -234,7 +234,7 @@ static PyObject *get_ipaddress(PyObject *self __unused, PyObject *args)
*
* @return Python list of objects on success, otherwise NULL.
*/
-static PyObject *get_interface_info(PyObject *self __unused, PyObject *args) {
+static PyObject *get_interfaces_info(PyObject *self __unused, PyObject *args) {
PyObject *devlist = NULL, *ethinf_py = NULL;
PyObject *inargs = NULL;
char **fetch_devs;
@@ -888,9 +888,11 @@ static struct PyMethodDef PyEthModuleMethods[] = {
.ml_flags = METH_VARARGS,
},
{
- .ml_name = "get_interface_info",
- .ml_meth = (PyCFunction)get_interface_info,
+ .ml_name = "get_interfaces_info",
+ .ml_meth = (PyCFunction)get_interfaces_info,
.ml_flags = METH_VARARGS,
+ .ml_doc = "Accepts a string, list or tupples of interface names. "
+ "Returns a list of ethtool.etherinfo objets with device information."
},
{
.ml_name = "get_netmask",