aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/hci/commands/ifmgmt_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpxe/src/hci/commands/ifmgmt_cmd.c')
-rw-r--r--gpxe/src/hci/commands/ifmgmt_cmd.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gpxe/src/hci/commands/ifmgmt_cmd.c b/gpxe/src/hci/commands/ifmgmt_cmd.c
index f2508e55..ad069f14 100644
--- a/gpxe/src/hci/commands/ifmgmt_cmd.c
+++ b/gpxe/src/hci/commands/ifmgmt_cmd.c
@@ -16,11 +16,14 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+FILE_LICENCE ( GPL2_OR_LATER );
+
#include <stdio.h>
#include <getopt.h>
#include <gpxe/netdevice.h>
#include <gpxe/command.h>
#include <usr/ifmgmt.h>
+#include <hci/ifmgmt_cmd.h>
/** @file
*
@@ -95,15 +98,15 @@ static int ifcommon_do_list ( int ( * payload ) ( struct net_device * ),
/**
* Execute if<xxx> command
*
- * @v payload Command to execute
- * @v verb Verb describing the action of the command
* @v argc Argument count
* @v argv Argument list
+ * @v payload Command to execute
+ * @v verb Verb describing the action of the command
* @ret rc Exit code
*/
-static __attribute__ (( regparm ( 2 ) )) int
-ifcommon_exec ( int ( * payload ) ( struct net_device * ),
- const char *verb, int argc, char **argv ) {
+int ifcommon_exec ( int argc, char **argv,
+ int ( * payload ) ( struct net_device * ),
+ const char *verb ) {
int c;
/* Parse options */
@@ -134,7 +137,7 @@ static int ifopen_payload ( struct net_device *netdev ) {
}
static int ifopen_exec ( int argc, char **argv ) {
- return ifcommon_exec ( ifopen_payload, "Open", argc, argv );
+ return ifcommon_exec ( argc, argv, ifopen_payload, "Open" );
}
/* "ifclose" command */
@@ -145,7 +148,7 @@ static int ifclose_payload ( struct net_device *netdev ) {
}
static int ifclose_exec ( int argc, char **argv ) {
- return ifcommon_exec ( ifclose_payload, "Close", argc, argv );
+ return ifcommon_exec ( argc, argv, ifclose_payload, "Close" );
}
/* "ifstat" command */
@@ -156,8 +159,8 @@ static int ifstat_payload ( struct net_device *netdev ) {
}
static int ifstat_exec ( int argc, char **argv ) {
- return ifcommon_exec ( ifstat_payload, "Display status of",
- argc, argv );
+ return ifcommon_exec ( argc, argv,
+ ifstat_payload, "Display status of" );
}
/** Interface management commands */