Ignore:
Timestamp:
06/29/06 20:58:23 (15 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
47de0aa
Parents:
b01455c
Message:

Updated the various tools to have improved usage() functions, and to support calling libtrace's trace_help() function via a -H / --libtrace-help cmdline arg. At the moment trace_help() will print out a list of the format modules and the URI schemes they support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracestats/tracestats.c

    re49ec63 r66caf4b  
    124124void usage(char *argv0)
    125125{
    126         fprintf(stderr,"Usage: %s [--filter|-f bpf ]... libtraceuri...\n",argv0);
     126        fprintf(stderr,"Usage: %s [-H|--libtrace-help] [--filter|-f bpf ]... libtraceuri...\n",argv0);
    127127}
    128128
     
    134134                int option_index;
    135135                struct option long_options[] = {
    136                         { "filter",     1, 0, 'f' },
    137                         { NULL,         0, 0, 0   },
     136                        { "filter",        1, 0, 'f' },
     137                        { "libtrace-help", 0, 0, 'H' },
     138                        { NULL,            0, 0, 0   },
    138139                };
    139140
    140                 int c=getopt_long(argc, argv, "f:",
     141                int c=getopt_long(argc, argv, "f:H",
    141142                                long_options, &option_index);
    142143
     
    152153                                filters[filter_count-1].count=0;
    153154                                filters[filter_count-1].bytes=0;
     155                                break;
     156                        case 'H':
     157                                trace_help();
     158                                exit(1);
    154159                                break;
    155160                        default:
Note: See TracChangeset for help on using the changeset viewer.