Bug 135405 - Strange test of /class in /sbin/start_udev
Strange test of /class in /sbin/start_udev
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Depends On:
  Show dependency treegraph
Reported: 2004-10-12 11:35 EDT by Göran Uddeborg
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-11 08:53:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Göran Uddeborg 2004-10-12 11:35:04 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.7.2)

Description of problem:
In /sbin/start_udev, on line 24, there is a test

   [ ! -d $sysfs_dir/class ] || exit 1

Unless sysfs_dir is imported in the environment, the semantics of this
line is to exit if there does exist a directory /class.  Probably that
is seldom the case.

Later on, on line 33, the variable used above is set


Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.mkdir /class

(I haven't actually run this.  I found this during a "code inspection".)

Additional info:

Presumably, the variable settings should be done before the tests, and
this particular test should be inverted. 

   [ -d $sysfs_dir/class ] || exit 1
Comment 1 Harald Hoyer 2004-10-13 04:45:36 EDT
thank god it's a double bug :)
Thank you very much for spotting this!

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