X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/7e967592712b41933c80c93c24a49e8bf7186aa2..1e0479ad19b7ff1ac1fa7a835d8f85f7157e786a:/openwrt/target/linux/package/switch/src/switch-core.h diff --git a/openwrt/target/linux/package/switch/src/switch-core.h b/openwrt/target/linux/package/switch/src/switch-core.h index bdf0ae1f8..5292469c0 100644 --- a/openwrt/target/linux/package/switch/src/switch-core.h +++ b/openwrt/target/linux/package/switch/src/switch-core.h @@ -27,6 +27,7 @@ typedef struct { typedef struct { struct list_head list; char *name; + char *version; char *interface; int cpuport; int ports; @@ -47,4 +48,12 @@ extern switch_vlan_config *switch_parse_vlan(switch_driver *driver, char *buf); extern int switch_parse_media(char *buf); extern int switch_print_media(char *buf, int media); +static inline char *strdup(char *str) +{ + char *new = kmalloc(strlen(str) + 1, GFP_KERNEL); + strcpy(new, str); + return new; +} + + #endif