search for: fetch_tv

Displaying 9 results from an estimated 9 matches for "fetch_tv".

Did you mean: fetch_ctx
2009 Aug 13
0
[Bridge] [PATCH] bridge-utils: Add 'hairpin' port forwarding mode
...*dir, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + snprintf(path, SYSFS_PATH_MAX, "%s/%s", dir, name); + return access(path, F_OK); +} + static void fetch_id(const char *dev, const char *name, struct bridge_id *id) { FILE *f = fpopen(dev, name); @@ -73,6 +81,12 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Check if a feature is supported. */ +static int feature_supported(const char *dev, const char *feature) +{ + return !fpaccess(dev, feature); +} + /* * Convert device name to an index in the list of ports in...
2009 Aug 13
0
[Bridge] [PATCH] bridge-utils: Add 'hairpin' port forwarding mode
...*dir, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + snprintf(path, SYSFS_PATH_MAX, "%s/%s", dir, name); + return access(path, F_OK); +} + static void fetch_id(const char *dev, const char *name, struct bridge_id *id) { FILE *f = fpopen(dev, name); @@ -73,6 +81,12 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Check if a feature is supported. */ +static int feature_supported(const char *dev, const char *feature) +{ + return !fpaccess(dev, feature); +} + /* * Convert device name to an index in the list of ports in...
2009 Aug 13
0
[Bridge] [PATCH] bridge-utils: Add 'hairpin' port forwarding mode
...*dir, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + snprintf(path, SYSFS_PATH_MAX, "%s/%s", dir, name); + return access(path, F_OK); +} + static void fetch_id(const char *dev, const char *name, struct bridge_id *id) { FILE *f = fpopen(dev, name); @@ -73,6 +81,12 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Check if a feature is supported. */ +static int feature_supported(const char *dev, const char *feature) +{ + return !fpaccess(dev, feature); +} + /* * Convert device name to an index in the list of ports in...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...st char *dev, const char *name) int value = -1; if (!f) - fprintf(stderr, "%s: %s\n", dev, strerror(errno)); + fprintf(stderr, "%s/%s: %s\n", dev, name, + strerror(errno)); else { fscanf(f, "%i", &value); fclose(f); @@ -73,6 +82,27 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Fetch a string attribute out of sysfs. */ +static void fetch_string(const char *dev, const char *name, char *string) +{ + FILE *f = fpopen(dev, name); + + if (!f) { + fprintf(stderr, "%s/%s: %s\n", d...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...st char *dev, const char *name) int value = -1; if (!f) - fprintf(stderr, "%s: %s\n", dev, strerror(errno)); + fprintf(stderr, "%s/%s: %s\n", dev, name, + strerror(errno)); else { fscanf(f, "%i", &value); fclose(f); @@ -73,6 +82,27 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Fetch a string attribute out of sysfs. */ +static void fetch_string(const char *dev, const char *name, char *string) +{ + FILE *f = fpopen(dev, name); + + if (!f) { + fprintf(stderr, "%s/%s: %s\n", d...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...st char *dev, const char *name) int value = -1; if (!f) - fprintf(stderr, "%s: %s\n", dev, strerror(errno)); + fprintf(stderr, "%s/%s: %s\n", dev, name, + strerror(errno)); else { fscanf(f, "%i", &value); fclose(f); @@ -73,6 +82,27 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Fetch a string attribute out of sysfs. */ +static void fetch_string(const char *dev, const char *name, char *string) +{ + FILE *f = fpopen(dev, name); + + if (!f) { + fprintf(stderr, "%s/%s: %s\n", d...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
...+++---- libbridge/libbridge_private.h | 1 + 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_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. */ +...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
...+++---- libbridge/libbridge_private.h | 1 + 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_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. */ +...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
...+++---- libbridge/libbridge_private.h | 1 + 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_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. */ +...