Просмотр исходного кода

[hci] Expose ifcommon_exec() in a local header so wireless commands can use it

This keeps code size down, since the wireless interface management
commands have the same command-line interface and overall structure as
the wired commands.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
tags/v0.9.8
Joshua Oreman 15 лет назад
Родитель
Сommit
15ce2fb851
2 измененных файлов: 32 добавлений и 1 удалений
  1. 2
    1
      src/hci/commands/ifmgmt_cmd.c
  2. 30
    0
      src/hci/commands/ifmgmt_cmd.h

+ 2
- 1
src/hci/commands/ifmgmt_cmd.c Просмотреть файл

@@ -23,6 +23,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
23 23
 #include <gpxe/netdevice.h>
24 24
 #include <gpxe/command.h>
25 25
 #include <usr/ifmgmt.h>
26
+#include "ifmgmt_cmd.h"
26 27
 
27 28
 /** @file
28 29
  *
@@ -103,7 +104,7 @@ static int ifcommon_do_list ( int ( * payload ) ( struct net_device * ),
103 104
  * @v argv		Argument list
104 105
  * @ret rc		Exit code
105 106
  */
106
-static __attribute__ (( regparm ( 2 ) )) int
107
+__attribute__ (( regparm ( 2 ) )) int
107 108
 ifcommon_exec ( int ( * payload ) ( struct net_device * ),
108 109
 		const char *verb, int argc, char **argv ) {
109 110
 	int c;

+ 30
- 0
src/hci/commands/ifmgmt_cmd.h Просмотреть файл

@@ -0,0 +1,30 @@
1
+/*
2
+ * Copyright (C) 2007 Michael Brown <mbrown@fensystems.co.uk>.
3
+ *
4
+ * This program is free software; you can redistribute it and/or
5
+ * modify it under the terms of the GNU General Public License as
6
+ * published by the Free Software Foundation; either version 2 of the
7
+ * License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful, but
10
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
+ * General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License
15
+ * along with this program; if not, write to the Free Software
16
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
+ */
18
+
19
+#ifndef _IFMGMT_CMD_H
20
+#define _IFMGMT_CMD_H
21
+
22
+FILE_LICENCE ( GPL2_OR_LATER );
23
+
24
+struct net_device;
25
+
26
+extern int ifcommon_exec ( int ( * payload ) ( struct net_device * ),
27
+			   const char *verb, int argc, char **argv )
28
+	__attribute__ (( regparm ( 2 ) ));
29
+
30
+#endif /* _IFMGMT_CMD_H */

Загрузка…
Отмена
Сохранить