Show
Ignore:
Timestamp:
11/20/08 20:57:53 (5 years ago)
Author:
khali
Message:

Add support for reading back to short writes.

Files:
1 modified

Legend:

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

    r5393 r5394  
    317317        switch (size) { 
    318318        case I2C_SMBUS_BYTE: 
    319                 /* No readback */ 
     319                res = i2c_smbus_read_byte(file); 
     320                value = daddress; 
    320321                break; 
    321322        case I2C_SMBUS_WORD_DATA: 
     
    326327        } 
    327328        close(file); 
    328  
    329         if (size == I2C_SMBUS_BYTE) /* We're done */ 
    330                 exit(0); 
    331329 
    332330        if (res < 0) {