search for: br_sysfs_open

Displaying 6 results from an estimated 6 matches for "br_sysfs_open".

2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
..._devif.c index 34e3cc8..547bb86 100644 --- a/libbridge/libbridge_devif.c +++ b/libbridge/libbridge_devif.c @@ -73,6 +73,26 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Open sysfs path for writing bridge properties. */ +static FILE *br_sysfs_open(const char *bridge, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + /* Try accessing /sys/class/net/$bridge/bridge/$name. */ + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s" + SYSFS_BRIDGE_DIR "/%s", bridge, name); + if (!access(path, F_OK)) + return fopen(path, &q...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
..._devif.c index 34e3cc8..547bb86 100644 --- a/libbridge/libbridge_devif.c +++ b/libbridge/libbridge_devif.c @@ -73,6 +73,26 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Open sysfs path for writing bridge properties. */ +static FILE *br_sysfs_open(const char *bridge, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + /* Try accessing /sys/class/net/$bridge/bridge/$name. */ + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s" + SYSFS_BRIDGE_DIR "/%s", bridge, name); + if (!access(path, F_OK)) + return fopen(path, &q...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
..._devif.c index 34e3cc8..547bb86 100644 --- a/libbridge/libbridge_devif.c +++ b/libbridge/libbridge_devif.c @@ -73,6 +73,26 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Open sysfs path for writing bridge properties. */ +static FILE *br_sysfs_open(const char *bridge, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + /* Try accessing /sys/class/net/$bridge/bridge/$name. */ + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s" + SYSFS_BRIDGE_DIR "/%s", bridge, name); + if (!access(path, F_OK)) + return fopen(path, &q...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...-"); + } else { + fscanf(f, "%s", string); + fclose(f); + } +} + +/* Check if a feature is supported. */ +static int feature_supported(const char *dev, const char *feature) +{ + return !fpaccess(dev, feature); +} + /* Open sysfs path for writing bridge properties. */ static FILE *br_sysfs_open(const char *bridge, const char *name) { @@ -168,7 +198,8 @@ static int old_get_bridge_info(const char *bridge, struct bridge_info *info) __jiffies_to_tv(&info->topology_change_timer_value, i.topology_change_timer_value); __jiffies_to_tv(&info->gc_timer_value, i.gc_timer_valu...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...-"); + } else { + fscanf(f, "%s", string); + fclose(f); + } +} + +/* Check if a feature is supported. */ +static int feature_supported(const char *dev, const char *feature) +{ + return !fpaccess(dev, feature); +} + /* Open sysfs path for writing bridge properties. */ static FILE *br_sysfs_open(const char *bridge, const char *name) { @@ -168,7 +198,8 @@ static int old_get_bridge_info(const char *bridge, struct bridge_info *info) __jiffies_to_tv(&info->topology_change_timer_value, i.topology_change_timer_value); __jiffies_to_tv(&info->gc_timer_value, i.gc_timer_valu...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...-"); + } else { + fscanf(f, "%s", string); + fclose(f); + } +} + +/* Check if a feature is supported. */ +static int feature_supported(const char *dev, const char *feature) +{ + return !fpaccess(dev, feature); +} + /* Open sysfs path for writing bridge properties. */ static FILE *br_sysfs_open(const char *bridge, const char *name) { @@ -168,7 +198,8 @@ static int old_get_bridge_info(const char *bridge, struct bridge_info *info) __jiffies_to_tv(&info->topology_change_timer_value, i.topology_change_timer_value); __jiffies_to_tv(&info->gc_timer_value, i.gc_timer_valu...