Changeset 808eeef for libwandio/wandio.c


Ignore:
Timestamp:
05/15/13 10:57:59 (9 years ago)
Author:
Shane Alcock <salcock@…>
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:
8a7d4b5
Parents:
d57ae6f
Message:
  • Added 'noautodetect' option to the LIBTRACEIO environment variable so that automatic compression detection can be disabled for any libtrace format
  • Removed debug output from format_erf.c
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libwandio/wandio.c

    r0acfd1e r808eeef  
    5555int force_directio_write = 0;
    5656int force_directio_read = 0;
     57int use_autodetect = 1;
    5758unsigned int use_threads = -1;
    5859unsigned int max_buffers = 50;
     
    6566 * directwrite -- bypass the diskcache on write
    6667 * directread -- bypass the diskcache on read
     68 * noautodetect -- disable autodetection of file compression, assume all files
     69 *                 are uncompressed
    6770 * nothreads -- Don't use threads
    6871 * threads=n -- Use a maximum of 'n' threads for thread farms
     
    8285        else if (strcmp(option,"nothreads") == 0)
    8386                use_threads = 0;
     87        else if (strcmp(option,"noautodetect") == 0)
     88                use_autodetect = 0;
    8489        else if (strncmp(option,"threads=",8) == 0)
    8590                use_threads = atoi(option+8);
     
    127132static io_t *create_io_reader(const char *filename, int autodetect)
    128133{
    129         parse_env();
    130134
    131135        /* Use a peeking reader to look at the start of the trace file and
     
    191195
    192196DLLEXPORT io_t *wandio_create(const char *filename) {
    193         return create_io_reader(filename, 1);
     197        parse_env();
     198        return create_io_reader(filename, use_autodetect);
    194199}
    195200
    196201DLLEXPORT io_t *wandio_create_uncompressed(const char *filename) {
     202        parse_env();
    197203        return create_io_reader(filename, 0);
    198204}
Note: See TracChangeset for help on using the changeset viewer.