|
@@ -98,15 +98,15 @@ static int ifcommon_do_list ( int ( * payload ) ( struct net_device * ),
|
98
|
98
|
/**
|
99
|
99
|
* Execute if<xxx> command
|
100
|
100
|
*
|
101
|
|
- * @v payload Command to execute
|
102
|
|
- * @v verb Verb describing the action of the command
|
103
|
101
|
* @v argc Argument count
|
104
|
102
|
* @v argv Argument list
|
|
103
|
+ * @v payload Command to execute
|
|
104
|
+ * @v verb Verb describing the action of the command
|
105
|
105
|
* @ret rc Exit code
|
106
|
106
|
*/
|
107
|
|
-__attribute__ (( regparm ( 2 ) )) int
|
108
|
|
-ifcommon_exec ( int ( * payload ) ( struct net_device * ),
|
109
|
|
- const char *verb, int argc, char **argv ) {
|
|
107
|
+int ifcommon_exec ( int argc, char **argv,
|
|
108
|
+ int ( * payload ) ( struct net_device * ),
|
|
109
|
+ const char *verb ) {
|
110
|
110
|
int c;
|
111
|
111
|
|
112
|
112
|
/* Parse options */
|
|
@@ -137,7 +137,7 @@ static int ifopen_payload ( struct net_device *netdev ) {
|
137
|
137
|
}
|
138
|
138
|
|
139
|
139
|
static int ifopen_exec ( int argc, char **argv ) {
|
140
|
|
- return ifcommon_exec ( ifopen_payload, "Open", argc, argv );
|
|
140
|
+ return ifcommon_exec ( argc, argv, ifopen_payload, "Open" );
|
141
|
141
|
}
|
142
|
142
|
|
143
|
143
|
/* "ifclose" command */
|
|
@@ -148,7 +148,7 @@ static int ifclose_payload ( struct net_device *netdev ) {
|
148
|
148
|
}
|
149
|
149
|
|
150
|
150
|
static int ifclose_exec ( int argc, char **argv ) {
|
151
|
|
- return ifcommon_exec ( ifclose_payload, "Close", argc, argv );
|
|
151
|
+ return ifcommon_exec ( argc, argv, ifclose_payload, "Close" );
|
152
|
152
|
}
|
153
|
153
|
|
154
|
154
|
/* "ifstat" command */
|
|
@@ -159,8 +159,8 @@ static int ifstat_payload ( struct net_device *netdev ) {
|
159
|
159
|
}
|
160
|
160
|
|
161
|
161
|
static int ifstat_exec ( int argc, char **argv ) {
|
162
|
|
- return ifcommon_exec ( ifstat_payload, "Display status of",
|
163
|
|
- argc, argv );
|
|
162
|
+ return ifcommon_exec ( argc, argv,
|
|
163
|
+ ifstat_payload, "Display status of" );
|
164
|
164
|
}
|
165
|
165
|
|
166
|
166
|
/** Interface management commands */
|