From e842b88809a9e2949be6aa8c63dc29b152f7bb3b Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Wed, 19 Jan 2011 14:58:02 +0100 Subject: Added ethtool.version string constant This is useful to identify the python-ethtool version at runtime. Signed-off-by: David Sommerseth --- python-ethtool/ethtool.c | 1 + 1 file changed, 1 insertion(+) (limited to 'python-ethtool') diff --git a/python-ethtool/ethtool.c b/python-ethtool/ethtool.c index feb6917..a29f052 100644 --- a/python-ethtool/ethtool.c +++ b/python-ethtool/ethtool.c @@ -1058,5 +1058,6 @@ PyMODINIT_FUNC initethtool(void) PyModule_AddIntConstant(m, "IFF_DYNAMIC", IFF_DYNAMIC); /* Dialup device with changing addresses. */ PyModule_AddIntConstant(m, "AF_INET", AF_INET); /* IPv4 interface */ PyModule_AddIntConstant(m, "AF_INET6", AF_INET6); /* IPv6 interface */ + PyModule_AddStringConstant(m, "version", "python-ethtool v" VERSION); } -- cgit