Show
Ignore:
Timestamp:
04/24/08 14:43:40 (4 years ago)
Author:
khali
Message:

Whitespace cleanups.

Files:
1 modified

Legend:

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

    r5207 r5210  
    3939{ 
    4040        fprintf(stderr, 
    41                 "Usage: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]\n" 
    42                 "  I2CBUS is an integer or an I2C bus name\n" 
    43                 "  ADDRESS is an integer (0x03 - 0x77)\n" 
    44                 "  MODE is one of:\n" 
    45                 "    b (read byte data, default)\n" 
    46                 "    w (read word data)\n" 
    47                 "    c (write byte/read byte)\n" 
    48                 "    Append p for SMBus PEC\n"); 
     41                "Usage: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]\n" 
     42                "  I2CBUS is an integer or an I2C bus name\n" 
     43                "  ADDRESS is an integer (0x03 - 0x77)\n" 
     44                "  MODE is one of:\n" 
     45                "    b (read byte data, default)\n" 
     46                "    w (read word data)\n" 
     47                "    c (write byte/read byte)\n" 
     48                "    Append p for SMBus PEC\n"); 
    4949        exit(1); 
    5050} 
     
    5757        if (ioctl(file, I2C_FUNCS, &funcs) < 0) { 
    5858                fprintf(stderr, "Error: Could not get the adapter " 
    59                         "functionality matrix: %s\n", strerror(errno)); 
     59                        "functionality matrix: %s\n", strerror(errno)); 
    6060                return -1; 
    6161        } 
     
    6565                if (!(funcs & I2C_FUNC_SMBUS_READ_BYTE)) { 
    6666                        fprintf(stderr, "Error: Adapter for i2c bus %d does " 
    67                                 "not have read byte capability\n", i2cbus); 
     67                                "not have read byte capability\n", i2cbus); 
    6868                        return -1; 
    6969                } 
     
    7171                 && !(funcs & I2C_FUNC_SMBUS_WRITE_BYTE)) { 
    7272                        fprintf(stderr, "Error: Adapter for i2c bus %d does " 
    73                                 "not have write byte capability\n", i2cbus); 
     73                                "not have write byte capability\n", i2cbus); 
    7474                        return -1; 
    7575                } 
     
    7979                if (!(funcs & I2C_FUNC_SMBUS_READ_BYTE_DATA)) { 
    8080                        fprintf(stderr, "Error: Adapter for i2c bus %d does " 
    81                                 "not have read byte data capability\n", i2cbus); 
     81                                "not have read byte data capability\n", i2cbus); 
    8282                        return -1; 
    8383                } 
     
    8787                if (!(funcs & I2C_FUNC_SMBUS_READ_WORD_DATA)) { 
    8888                        fprintf(stderr, "Error: Adapter for i2c bus %d does " 
    89                                 "not have read word data capability\n", i2cbus); 
     89                                "not have read word data capability\n", i2cbus); 
    9090                        return -1; 
    9191                } 
     
    9696         && !(funcs & (I2C_FUNC_SMBUS_PEC | I2C_FUNC_I2C))) { 
    9797                fprintf(stderr, "Warning: Adapter for i2c bus %d does " 
    98                         "not seem to support PEC\n", i2cbus); 
     98                        "not seem to support PEC\n", i2cbus); 
    9999        } 
    100100 
     
    122122        if (size == I2C_SMBUS_BYTE && daddress >= 0 && pec) { 
    123123                fprintf(stderr, "WARNING! All I2C chips and some SMBus chips " 
    124                         "will interpret a write\nbyte command with PEC as a" 
    125                         "write byte data command, effectively writing a\n" 
    126                         "value into a register!\n"); 
     124                        "will interpret a write\nbyte command with PEC as a" 
     125                        "write byte data command, effectively writing a\n" 
     126                        "value into a register!\n"); 
    127127                dont++; 
    128128        } 
     
    224224 
    225225        if (!yes && !confirm(filename, address, size, daddress, pec)) 
    226                 exit(0); 
     226                exit(0); 
    227227 
    228228        if (pec && ioctl(file, I2C_PEC, 1) < 0) { 
    229229                fprintf(stderr, "Error: Could not set PEC: %s\n", 
    230                         strerror(errno)); 
     230                        strerror(errno)); 
    231231                exit(1); 
    232232        }