Changeset 5854

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

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

Location:
i2c-tools/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • i2c-tools/trunk/CHANGES

    r5830 r5854  
    1919                      Unload i2c-stub automatically if needed 
    2020                      Add support for multiple dumps 
     21  tools: Properly handle /dev/i2c not being a directory 
    2122 
    22233.0.2 (2008-11-29) 
  • 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);