Change the return type to handle the case where an invalid interface name is passed to this function.
This commit was SVN r20933.
Этот коммит содержится в:
родитель
9b7ab92de9
Коммит
ab18a3629f
@ -865,7 +865,7 @@ int opal_ifnametoindex(const char* if_name)
|
||||
* corresponding kernel index.
|
||||
*/
|
||||
|
||||
uint16_t opal_ifnametokindex(const char* if_name)
|
||||
int16_t opal_ifnametokindex(const char* if_name)
|
||||
{
|
||||
opal_if_t* intf;
|
||||
int rc = opal_ifinit();
|
||||
@ -1230,7 +1230,7 @@ opal_ifnametoindex(const char* if_name)
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
int16_t
|
||||
opal_ifnametokindex(const char* if_name)
|
||||
{
|
||||
return OPAL_ERR_NOT_SUPPORTED;
|
||||
|
@ -77,7 +77,7 @@ OPAL_DECLSPEC int opal_ifnametoindex(const char* if_name);
|
||||
* @param if_name (IN) Interface name
|
||||
* @return Interface kernel index
|
||||
*/
|
||||
OPAL_DECLSPEC uint16_t opal_ifnametokindex(const char* if_name);
|
||||
OPAL_DECLSPEC int16_t opal_ifnametokindex(const char* if_name);
|
||||
|
||||
/**
|
||||
* Lookup an interface by opal_list index and return its kernel index.
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user