@@ -120,7 +120,7 @@ static PyObject *get_hwaddress(PyObject *self __unused, PyObject *args)
120120 const char * devname ;
121121 char hwaddr [20 ];
122122
123- if (!PyArg_ParseTuple (args , "s" , & devname ))
123+ if (!PyArg_ParseTuple (args , "s* " , & devname ))
124124 return NULL ;
125125
126126 /* Setup our request structure. */
@@ -162,7 +162,7 @@ static PyObject *get_ipaddress(PyObject *self __unused, PyObject *args)
162162 const char * devname ;
163163 char ipaddr [20 ];
164164
165- if (!PyArg_ParseTuple (args , "s" , & devname ))
165+ if (!PyArg_ParseTuple (args , "s* " , & devname ))
166166 return NULL ;
167167
168168 /* Setup our request structure. */
@@ -288,7 +288,7 @@ static PyObject *get_flags (PyObject *self __unused, PyObject *args)
288288 const char * devname ;
289289 int fd , err ;
290290
291- if (!PyArg_ParseTuple (args , "s" , & devname ))
291+ if (!PyArg_ParseTuple (args , "s* " , & devname ))
292292 return NULL ;
293293
294294 /* Setup our request structure. */
@@ -321,7 +321,7 @@ static PyObject *get_netmask (PyObject *self __unused, PyObject *args)
321321 const char * devname ;
322322 char netmask [20 ];
323323
324- if (!PyArg_ParseTuple (args , "s" , & devname ))
324+ if (!PyArg_ParseTuple (args , "s* " , & devname ))
325325 return NULL ;
326326
327327 /* Setup our request structure. */
@@ -361,7 +361,7 @@ static PyObject *get_broadcast(PyObject *self __unused, PyObject *args)
361361 const char * devname ;
362362 char broadcast [20 ];
363363
364- if (!PyArg_ParseTuple (args , "s" , & devname ))
364+ if (!PyArg_ParseTuple (args , "s* " , & devname ))
365365 return NULL ;
366366
367367 /* Setup our request structure. */
@@ -402,7 +402,7 @@ static PyObject *get_module(PyObject *self __unused, PyObject *args)
402402 char buf [2048 ];
403403 const char * devname ;
404404
405- if (!PyArg_ParseTuple (args , "s" , & devname ))
405+ if (!PyArg_ParseTuple (args , "s* " , & devname ))
406406 return NULL ;
407407
408408 /* Setup our control structures. */
@@ -472,7 +472,7 @@ static PyObject *get_businfo(PyObject *self __unused, PyObject *args)
472472 char buf [1024 ];
473473 const char * devname ;
474474
475- if (!PyArg_ParseTuple (args , "s" , & devname ))
475+ if (!PyArg_ParseTuple (args , "s* " , & devname ))
476476 return NULL ;
477477
478478 /* Setup our control structures. */
@@ -538,7 +538,7 @@ static int get_dev_value(int cmd, PyObject *args, void *value)
538538 const char * devname ;
539539 int err = -1 ;
540540
541- if (PyArg_ParseTuple (args , "s" , & devname ))
541+ if (PyArg_ParseTuple (args , "s* " , & devname ))
542542 err = send_command (cmd , devname , value );
543543
544544 return err ;
@@ -560,7 +560,7 @@ static int dev_set_int_value(int cmd, PyObject *args)
560560 struct ethtool_value eval ;
561561 const char * devname ;
562562
563- if (!PyArg_ParseTuple (args , "si " , & devname , & eval .data ))
563+ if (!PyArg_ParseTuple (args , "s*i " , & devname , & eval .data ))
564564 return -1 ;
565565
566566 return send_command (cmd , devname , & eval );
@@ -745,7 +745,7 @@ static PyObject *set_coalesce(PyObject *self __unused, PyObject *args)
745745 const char * devname ;
746746 PyObject * dict ;
747747
748- if (!PyArg_ParseTuple (args , "sO " , & devname , & dict ))
748+ if (!PyArg_ParseTuple (args , "s*O " , & devname , & dict ))
749749 return NULL ;
750750
751751 if (struct_desc_from_dict (ethtool_coalesce_desc , & coal , dict ) != 0 )
@@ -785,7 +785,7 @@ static PyObject *set_ringparam(PyObject *self __unused, PyObject *args)
785785 const char * devname ;
786786 PyObject * dict ;
787787
788- if (!PyArg_ParseTuple (args , "sO " , & devname , & dict ))
788+ if (!PyArg_ParseTuple (args , "s*O " , & devname , & dict ))
789789 return NULL ;
790790
791791 if (struct_desc_from_dict (ethtool_ringparam_desc , & ring , dict ) != 0 )
0 commit comments