Displaying 10 results from an estimated 10 matches for "__jiffies_to_tv".
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...-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", dev, name,
+ strerror(errno));
+ sprintf(string, &q...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...-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", dev, name,
+ strerror(errno));
+ sprintf(string, &q...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...-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", dev, name,
+ strerror(errno));
+ sprintf(string, &q...
2009 Aug 13
0
[Bridge] [PATCH] bridge-utils: Add 'hairpin' port forwarding mode
...ATH_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 bridge.
*
@@ -239,6 +253,7 @@ static int old_get_po...
2009 Aug 13
0
[Bridge] [PATCH] bridge-utils: Add 'hairpin' port forwarding mode
...ATH_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 bridge.
*
@@ -239,6 +253,7 @@ static int old_get_po...
2009 Aug 13
0
[Bridge] [PATCH] bridge-utils: Add 'hairpin' port forwarding mode
...ATH_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 bridge.
*
@@ -239,6 +253,7 @@ static int old_get_po...
2007 Apr 18
0
[Bridge] compiling bridge-utils-0.9.6
...bbridge_misc.c: In function `__tv_to_jiffies':
libbridge_misc.c:33: error: `HZ' undeclared (first use in this function)
libbridge_misc.c:33: error: (Each undeclared identifier is reported only
once
libbridge_misc.c:33: error: for each function it appears in.)
libbridge_misc.c: In function `__jiffies_to_tv':
libbridge_misc.c:40: error: `HZ' undeclared (first use in this function)
make[1]: *** [libbridge_misc.o] Error 1
I could not find any hints.
Regards, Wilfried
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
...+
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. */
+ snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
...+
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. */
+ snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
...+
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. */
+ snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "...