search for: sysfs_class_net

Displaying 8 results from an estimated 8 matches for "sysfs_class_net".

2007 Jul 31
1
[Bridge] brctl uses incorrect sysfs path
...b/libbridge/libbridge_devif.c index 1decc28..65ea79a 100644 --- a/libbridge/libbridge_devif.c +++ b/libbridge/libbridge_devif.c @@ -282,7 +282,7 @@ static int br_set(const char *bridge, const char *name, char path[SYSFS_PATH_MAX]; FILE *f; - snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", bridge, name); + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge/%s", bridge, name); f = fopen(path, "w"); if (f) { diff --git a/libbridge/libbridge_init.c b/libbridge/libbridge_init.c index e2eab77..f31addc 100644 --- a/li...
2007 Apr 18
0
[Bridge] libbridge<->sysfs interface - some bugs
...@@ if (!f) fprintf(stderr, "%s: %s\n", dev, strerror(errno)); else { - fscanf(f, "%d", &value); + fscanf(f, "%i", &value); fclose(f); } return value; @@ -282,7 +282,7 @@ char path[SYSFS_PATH_MAX]; FILE *f; - snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", bridge, name); + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge/%s", bridge, name); f = fopen(path, "w"); if (f) { diff -ru --strip-trailing-cr bridge-utils-1.2/libbridge/libbridge_init.c /Arrow75/CN3XXX-SDK/linux/embedded_rootfs/build/bridge-...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
...me, __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, "w+"); + + /* Try using old-style of accessing bridge sysfs properties. */ + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", + bridge, name); + if (!acc...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
...me, __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, "w+"); + + /* Try using old-style of accessing bridge sysfs properties. */ + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", + bridge, name); + if (!acc...
2009 Jun 15
0
[Bridge] [PATCH] bridge-utils: fix sysfs path for setting bridge configuration parameters
...me, __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, "w+"); + + /* Try using old-style of accessing bridge sysfs properties. */ + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", + bridge, name); + if (!acc...
2005 Jan 06
0
skip unconnected interfaces
...OMPLETE) continue; + /* + * If we only want to configure net devices that + * are connected and it's been 10 seconds then + * ignore devices that don't have carriers. + */ + if (only_connected && now.tv_sec - start > 10) + if (ulong_from_sys_device_file(sysfs_class_net, + s->dev->name, + "carrier", + &carrier) < 0 + || !carrier) { + fprintf(stderr, "Skipping %s: NO CARRIER\n", s->dev->name); + continue; + } + pending++; if (s->expire - now.tv_sec <= 0)...
2004 May 28
1
ipconfig related question (do not get static IP setting)
Hi!! I found your ipconfig stuff in the udev rpm in SuSE 9.1. I'm about to setup a initramfs (pretty cool - much better than initrd) to boot linux diskless clients over the net. All the tools I would need, seem to be there with ipconfig/nfsmount ... I like to use the information I get from PXE/syslinux or Etherboot writing something like:
2008 May 24
3
ipconfig and boot filename option
Hi, ipconfig is used in ltsp (thin clients) initramfs. Some of the users have to have 2 dhcp servers in ltsp environments, so they hit on this problem: The first dhcp request is from the pxe rom boot code. This code ignores any dhcp offers that don't have a filename field. So they always get the correct address, from the ltsp server. The second dhcp request (in initramfs) is done by