Show
Ignore:
Timestamp:
05/05/08 16:55:01 (4 years ago)
Author:
khali
Message:

Share the error string between all functionality checks.

Files:
1 modified

Legend:

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

    r5240 r5241  
    6060        case I2C_SMBUS_BYTE: 
    6161                if (!(funcs & I2C_FUNC_SMBUS_WRITE_BYTE)) { 
    62                         fprintf(stderr, "Error: Adapter does " 
    63                                 "not have byte send capability\n"); 
     62                        fprintf(stderr, MISSING_FUNC_FMT, "byte send"); 
    6463                        return -1; 
    6564                } 
     
    6867        case I2C_SMBUS_BYTE_DATA: 
    6968                if (!(funcs & I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) { 
    70                         fprintf(stderr, "Error: Adapter does " 
    71                                 "not have byte write capability\n"); 
     69                        fprintf(stderr, MISSING_FUNC_FMT, "byte write"); 
    7270                        return -1; 
    7371                } 
     
    7674        case I2C_SMBUS_WORD_DATA: 
    7775                if (!(funcs & I2C_FUNC_SMBUS_WRITE_WORD_DATA)) { 
    78                         fprintf(stderr, "Error: Adapter does " 
    79                                 "not have word write capability\n"); 
     76                        fprintf(stderr, MISSING_FUNC_FMT, "word write"); 
    8077                        return -1; 
    8178                }