今天看Linux内核代码,看到了list_for_each_save()函数,想仔细的研究一下。下面是源代码:list_for_each()的定义:/**
* list_for_each - iterate over a list
* @pos: the &struct list_head to use as a loop cursor.
* @head: the he...
该方法用到了ioctl操作ETHTOOL,需要root权限, 否则会失败!
// PARAM: devname -- just the device name such as eth0, eth1 etc.
// RETURN: -1 -- error , details can check errno
// 1 -- interface link up
// ...