* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+FILE_LICENCE ( GPL2_OR_LATER );
+
+#include <stdio.h>
#include <getopt.h>
-#include <vsprintf.h>
#include <gpxe/netdevice.h>
#include <gpxe/command.h>
#include <usr/ifmgmt.h>
+#include "ifmgmt_cmd.h"
/** @file
*
struct net_device *netdev;
int rc = 0;
- /* Print error if no network devices exist */
- if ( ! have_netdevs() ) {
- printf ( "No network interfaces\n" );
- return 1;
- }
-
/* Execute payload for each network device */
for_each_netdev ( netdev ) {
if ( payload ( netdev ) != 0 )
* @v argv Argument list
* @ret rc Exit code
*/
-static __attribute__ (( regparm ( 2 ) )) int
+__attribute__ (( regparm ( 2 ) )) int
ifcommon_exec ( int ( * payload ) ( struct net_device * ),
const char *verb, int argc, char **argv ) {
int c;