Bug 136591 - private libsysfs cannot read from /sys/class/net/eth1/wireless/* files
private libsysfs cannot read from /sys/class/net/eth1/wireless/* files
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
Depends On:
  Show dependency treegraph
Reported: 2004-10-20 22:13 EDT by Dan Williams
Modified: 2013-03-05 22:41 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.4.0-8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-26 16:01:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to fix this (1.45 KB, patch)
2004-10-21 17:42 EDT, David Zeuthen
no flags Details | Diff

  None (edit)
Description Dan Williams 2004-10-20 22:13:42 EDT
Happens on an Lucent WaveLAN card (orinoco+hermes).  Card is inserted,
but shows up as net.80203 because sysfs cannot read from the
"attributes" in /sys/class/net/eth1/wireless/*.

ncd = net_class_device.c:net_class_pre_process()
foo = sysfs_dir.c:sysfs_read_attribute()

The problem code is in sysfs_read_attribute():
	length = read(fd, fbuf, pgsize);
	if (length < 0) {
		return -1;

Here, length == -1 after the read().  These files are _not_ readable
with 'cat', which is probably why read() returns -1.  The interface is
not yet "up" yet, which might be why the reads fail.

I'm not sure what to do about this.  The reason the interface is not
"up" is because it doesn't have an ifcfg-eth1 file, and hence the
network hotplug scripts won't bring it up.  I think we need to loosen
the checks for wireless devices, maybe just see if the
/sys/class/net/*/wireless directory exists?  We're not guaranteed that
the interface will be up by the time HAL gets the hotplug event.
Comment 1 Dan Williams 2004-10-20 22:14:07 EDT
I can show you the situation tomorrow in the office.
Comment 2 David Zeuthen 2004-10-21 16:13:25 EDT
> I think we need to loosen
> the checks for wireless devices, maybe just see if the
> /sys/class/net/*/wireless directory exists?

Sounds good to me - should be simple. Do you have a patch or hardware
I can test with?

Btw, I plan to get rid of the private libsysfs copy in hald rather
shortly as it's trivial to replace with something that is a lot
simpler and does a lot less IO. I plan to do this on the 0.4.x stable
branch as it won't change ABI.


Comment 3 David Zeuthen 2004-10-21 17:42:58 EDT
Created attachment 105614 [details]
Patch to fix this

Should apply to the hal package
Comment 4 David Zeuthen 2004-10-22 13:49:35 EDT
Moving to MODIFIED
Comment 5 David Zeuthen 2004-10-26 16:01:39 EDT
Fixed in hal-0.4.0-8; currently available from 


hopefully this will make it into FC3.

Note You need to log in before you can comment on or make changes to this bug.