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

Consistently restrict the allowed I2C device address to 0x03 - 0x77.

Files:
1 modified

Legend:

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

    r5201 r5203  
    11/* 
    22    i2cget.c - A user-space program to read an I2C register. 
    3     Copyright (C) 2005       Jean Delvare <khali@linux-fr.org> 
     3    Copyright (C) 2005-2008  Jean Delvare <khali@linux-fr.org> 
    44 
    55    Based on i2cset.c: 
     
    191191 
    192192        address = strtol(argv[flags+2], &end, 0); 
    193         if (*end || address < 3 || address > 0x77) { 
     193        if (*end || address < 0x03 || address > 0x77) { 
    194194                fprintf(stderr, "Error: Chip address invalid!\n"); 
    195195                help();