/**
* 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
*/
-__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 */
}
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 */
}
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 */
}
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 */
struct net_device;
-extern int ifcommon_exec ( int ( * payload ) ( struct net_device * ),
- const char *verb, int argc, char **argv )
- __attribute__ (( regparm ( 2 ) ));
+extern int ifcommon_exec ( int argc, char **argv,
+ int ( * payload ) ( struct net_device * ),
+ const char *verb );
#endif /* _IFMGMT_CMD_H */