Changeset dfc2673 for lib/format_erf.c


Ignore:
Timestamp:
10/07/05 14:20:25 (16 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:
5c88a60
Parents:
f6879f3
Message:

Fixed Makefile.ams to actually use the included DAG directory from --with-dag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.c

    rae8196e rdfc2673  
    290290static int erf_init_output(struct libtrace_out_t *libtrace) {
    291291        char *filemode = 0;
     292        int fd;
    292293        libtrace->format_data = (struct libtrace_format_data_out_t *)
    293294                calloc(1,sizeof(struct libtrace_format_data_out_t));
     
    306307        else {
    307308                // TRACE
     309                fd = open(libtrace->uridata, O_CREAT | O_LARGEFILE | O_WRONLY, S_IRUSR | S_IWUSR);
     310                if (fd <= 0) {
     311                        return 0;
     312                }
    308313#if HAVE_ZLIB
    309314                // using gzdopen means we can set O_LARGEFILE
    310315                // ourselves. However, this way is messy and
    311316                // we lose any error checking on "open"
    312                 OUTPUT.file =  gzdopen(open(
    313                                 libtrace->uridata,
    314                                 O_CREAT | O_LARGEFILE | O_WRONLY,
    315                                 S_IRUSR | S_IWUSR), filemode);
     317                OUTPUT.file =  gzdopen(fd, filemode);
    316318#else
    317                 OUTPUT.file =  fdopen(open(
    318                                 libtrace->uridata,
    319                                 O_CREAT | O_LARGEFILE | O_WRONLY,
    320                                 S_IRUSR | S_IWUSR), "w");
    321 #endif
     319                OUTPUT.file =  fdopen(fd, "w");
     320#endif
     321                 
    322322        }
    323323        free(filemode);
Note: See TracChangeset for help on using the changeset viewer.