diff options
| author | Stephen Hemminger <shemminger@osdl.org> | 2003-07-28 02:29:29 -0700 |
|---|---|---|
| committer | Stephen Hemminger <shemminger@osdl.org> | 2003-07-28 02:29:29 -0700 |
| commit | 67ef59de72e615afa44c0eb89017ec6d72a3b6b6 (patch) | |
| tree | 6125b75893ae8174d77f19828f45fb536d650610 | |
| parent | 4bf6c3e2ad1821a5c368e26ef454351c7ee82462 (diff) | |
[VLAN]: Convert VLAN procfs stubs to no-ops.
| -rw-r--r-- | net/8021q/Makefile | 7 | ||||
| -rw-r--r-- | net/8021q/vlanproc.c | 31 | ||||
| -rw-r--r-- | net/8021q/vlanproc.h | 10 |
3 files changed, 16 insertions, 32 deletions
diff --git a/net/8021q/Makefile b/net/8021q/Makefile index c816167992bb..97feb44dbdce 100644 --- a/net/8021q/Makefile +++ b/net/8021q/Makefile @@ -4,4 +4,9 @@ obj-$(CONFIG_VLAN_8021Q) += 8021q.o -8021q-objs := vlan.o vlanproc.o vlan_dev.o +8021q-objs := vlan.o vlan_dev.o + +ifeq ($(CONFIG_PROC_FS),y) +8021q-objs += vlanproc.o +endif + diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index b8e70418ce5f..127b5dda97b5 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c @@ -38,8 +38,6 @@ /****** Function Prototypes *************************************************/ -#ifdef CONFIG_PROC_FS - /* Proc filesystem interface */ static ssize_t vlan_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos); @@ -438,32 +436,3 @@ static int vlandev_get_info(char *buf, char **start, return cnt; } - -#else /* No CONFIG_PROC_FS */ - -/* - * No /proc - output stubs - */ - -int __init vlan_proc_init (void) -{ - return 0; -} - -void vlan_proc_cleanup(void) -{ - return; -} - - -int vlan_proc_add_dev(struct net_device *vlandev) -{ - return 0; -} - -int vlan_proc_rem_dev(struct net_device *vlandev) -{ - return 0; -} - -#endif /* No CONFIG_PROC_FS */ diff --git a/net/8021q/vlanproc.h b/net/8021q/vlanproc.h index ac1d67e6c397..badccbf97ac0 100644 --- a/net/8021q/vlanproc.h +++ b/net/8021q/vlanproc.h @@ -1,6 +1,7 @@ #ifndef __BEN_VLAN_PROC_INC__ #define __BEN_VLAN_PROC_INC__ +#ifdef CONFIG_PROC_FS int vlan_proc_init(void); int vlan_proc_rem_dev(struct net_device *vlandev); @@ -9,4 +10,13 @@ void vlan_proc_cleanup (void); #define VLAN_PROC_BUFSZ (4096) /* buffer size for printing proc info */ +#else /* No CONFIG_PROC_FS */ + +#define vlan_proc_init() (0) +#define vlan_proc_cleanup() do {} while(0) +#define vlan_proc_add_dev(dev) ((void)(dev), 0) +#define vlan_proc_rem_dev(dev) ((void)(dev), 0) + +#endif + #endif /* !(__BEN_VLAN_PROC_INC__) */ |
