Changeset 171cc28
- Timestamp:
- 04/21/07 14:21:13 (15 years ago)
- 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:
- 7be3cc4
- Parents:
- b916afc
- Location:
- tools/tracesplit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/tracesplit/tracesplit.c
r8d504c1 r171cc28 126 126 input=trace_create(argv[optind]); 127 127 if (trace_is_err(input)) { 128 trace_perror(input," ");128 trace_perror(input,"%s",argv[optind]); 129 129 return 1; 130 130 } 131 131 132 132 if (trace_start(input)==-1) { 133 trace_perror(input," ");133 trace_perror(input,"%s",argv[optind]); 134 134 return 1; 135 135 } … … 198 198 } 199 199 output=trace_create_output(buffer); 200 if (trace_is_err_output(output)) { 201 trace_perror_output(output,"%s",buffer); 202 free(buffer); 203 break; 204 } 200 205 trace_start_output(output); 206 if (trace_is_err_output(output)) { 207 trace_perror_output(output,"%s",buffer); 208 free(buffer); 209 break; 210 } 201 211 free(buffer); 202 212 filescreated ++; -
tools/tracesplit/tracesplit_dir.c
ra7282fb r171cc28 8 8 output = trace_create_output(uri); 9 9 if (trace_is_err_output(output)) { 10 trace_err = trace_get_err_output(output); 11 printf("Problem creating output trace (uri=%s): %s\n", 12 uri, trace_err.problem); 10 trace_perror_output(output,"%s",uri); 11 trace_destroy_output(output); 13 12 return NULL; 14 13 } 15 14 /* Default values for now */ 16 15 trace_start_output(output); 16 if (trace_is_err_output(output)) { 17 trace_perror_output(output,"%s",uri); 18 trace_destroy_output(output); 19 return NULL; 20 } 17 21 return output; 18 22 } … … 28 32 libtrace_err_t trace_err; 29 33 struct libtrace_packet_t *packet = trace_create_packet(); 30 31 34 32 35 if (argc < 3) { … … 42 45 } 43 46 if (trace_start(input)==-1) { 44 trace_perror(input, "");47 trace_perror(input,argv[1]); 45 48 return 1; 46 49 } … … 54 57 if (!out_write) { 55 58 out_write = create_output(argv[3]); 56 if (trace_is_err_output(out_write)) { 57 trace_perror_output(out_write,""); 59 if (!out_write) 58 60 return 1; 59 }60 61 } 61 62 if (trace_write_packet(out_write, packet)==-1){ … … 66 67 case 1: 67 68 if (!in_write) { 68 in_write = create_output(argv[2]);69 if (trace_is_err_output(in_write)) {70 trace_perror_output(in_write,"");71 return 1;72 }73 69 in_write = create_output(argv[2]); 74 70 if (!in_write)
Note: See TracChangeset
for help on using the changeset viewer.