Changeset 5854 for i2c-tools/trunk/tools

Show
Ignore:
Timestamp:
08/18/10 22:00:28 (18 months ago)
Author:
khali
Message:

Properly handle the rare case where /dev/i2c exists but isn't a
directory. Patch from Florian Fainelli.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • i2c-tools/trunk/tools/i2cbusses.c

    r5452 r5854  
    379379        file = open(filename, O_RDWR); 
    380380 
    381         if (file < 0 && errno == ENOENT) { 
     381        if (file < 0 && (errno == ENOENT || errno == ENOTDIR)) { 
    382382                sprintf(filename, "/dev/i2c-%d", i2cbus); 
    383383                file = open(filename, O_RDWR);