Changeset 5201

Show
Ignore:
Timestamp:
04/24/08 14:09:47 (7 months ago)
Author:
khali
Message:

Unify and shorten the usage messages. The details can be found in
the man pages so no need to be verbose.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • i2c-tools/trunk/CHANGES

    r5197 r5201  
    55  decode-vaio: Remove history 
    66  i2cdetect: Support i2c bus passed by name 
     7             Shorten the usage message 
    78  i2cdump: Support i2c bus passed by name 
     9           Shorten the usage message 
    810  i2cget: Support i2c bus passed by name 
     11          Shorten the usage message 
    912  i2cset: Support i2c bus passed by name 
     13          Shorten the usage message 
    1014 
    11153.0.1 (2008-04-04) 
  • i2c-tools/trunk/tools/i2cdetect.c

    r5200 r5201  
    3838{ 
    3939        fprintf(stderr, 
    40                 "Syntax: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\n" 
    41                 "        i2cdetect -F I2CBUS\n" 
    42                 "        i2cdetect -l\n" 
    43                 "        i2cdetect -V\n" 
    44                 "  I2CBUS is an integer\n" 
    45                 "  With -a, probe all addresses (NOT RECOMMENDED)\n" 
    46                 "  With -q, uses only quick write commands for probing (NOT " 
    47                 "RECOMMENDED)\n" 
    48                 "  With -r, uses only read byte commands for probing (NOT " 
    49                 "RECOMMENDED)\n" 
    50                 "  If provided, FIRST and LAST limit the probing range.\n" 
    51                 "  With -l, lists installed busses only\n"); 
     40                "Usage: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\n" 
     41                "       i2cdetect -F I2CBUS\n" 
     42                "       i2cdetect -l\n" 
     43                "  I2CBUS is an integer or an I2C bus name\n" 
     44                "  If provided, FIRST and LAST limit the probing range.\n"); 
    5245} 
    5346 
  • i2c-tools/trunk/tools/i2cdump.c

    r5200 r5201  
    3333static void help(void) 
    3434{ 
    35         fprintf(stderr, "Syntax: i2cdump [-f] [-r first-last] [-y] I2CBUS " 
    36                 "ADDRESS [MODE] [BANK [BANKREG]]\n" 
    37                 "        i2cdump -V\n" 
     35        fprintf(stderr, 
     36                "Usage: i2cdump [-f] [-y] [-r first-last] I2CBUS ADDRESS [MODE] [BANK [BANKREG]]\n" 
     37                "  I2CBUS is an integer or an I2C bus name\n" 
     38                "  ADDRESS is an integer (0x00 - 0x7f)\n" 
    3839                "  MODE is one of:\n" 
    3940                "    b (byte, default)\n" 
     
    4344                "    i (I2C block)\n" 
    4445                "    c (consecutive byte)\n" 
    45                 "    Append 'p' to 'b', 'w', 's' or 'c' for PEC checking\n" 
    46                 "  I2CBUS is an integer\n" 
    47                 "  ADDRESS is an integer 0x00 - 0x7f\n" 
    48                 "  BANK and BANKREG are for byte and word accesses (default " 
    49                 "bank 0, reg 0x4e)\n" 
    50                 "  BANK is the command for smbusblock accesses (default 0)\n"); 
     46                "    Append p for SMBus PEC\n"); 
    5147} 
    5248 
  • i2c-tools/trunk/tools/i2cget.c

    r5200 r5201  
    3838static void help(void) 
    3939{ 
    40         fprintf(stderr, "Syntax: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS " 
    41                 "[DATA-ADDRESS [MODE]]\n" 
    42                 "        i2cget -V\n" 
    43                 "  MODE can be: 'b' (read byte data, default)\n" 
    44                 "               'w' (read word data)\n" 
    45                 "               'c' (write byte/read byte)\n" 
    46                 "  If DATA-ADDRESS is omitted, a single read byte command is " 
    47                 "issued\n" 
    48                 "  Append 'p' to MODE for PEC checking\n" 
    49                 "  I2CBUS is an integer\n"); 
     40        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"); 
    5049        exit(1); 
    5150} 
  • i2c-tools/trunk/tools/i2cset.c

    r5200 r5201  
    3535static void help(void) 
    3636{ 
    37         fprintf(stderr, "Syntax: i2cset [-f] [-y] I2CBUS CHIP-ADDRESS DATA-ADDRESS " 
    38                 "VALUE [MODE] [MASK]\n" 
    39                 "        i2cset -V\n" 
    40                 "  MODE is 'b[yte]' or 'w[ord]' (default b)\n" 
    41                 "  Append 'p' to MODE for PEC checking\n" 
    42                 "  I2CBUS is an integer\n"); 
     37        fprintf(stderr, 
     38                "Usage: i2cset [-f] [-y] I2CBUS CHIP-ADDRESS DATA-ADDRESS VALUE [MODE] [MASK]\n" 
     39                "  I2CBUS is an integer or an I2C bus name\n" 
     40                "  ADDRESS is an integer (0x00 - 0x7f)\n" 
     41                "  MODE is one of:\n" 
     42                "    b (byte, default)\n" 
     43                "    w (word)\n" 
     44                "    Append p for SMBus PEC\n"); 
    4345        exit(1); 
    4446}