Changeset 640
- Timestamp:
- 03/03/06 17:26:25 (7 years ago)
- Location:
- trunk/tools/tracemerge
- Files:
-
- 2 added
- 1 edited
-
test-tracemerge.sh (added)
-
tracemerge.1 (added)
-
tracemerge.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/tracemerge/tracemerge.c
r551 r640 47 47 } 48 48 49 if (optind+2 <argc)49 if (optind+2>argc) 50 50 usage(argv[0]); 51 51 52 52 output=trace_create_output(argv[optind]); 53 if (!output) { 54 fprintf(stderr,"Unable to open output file %s\n",argv[optind]); 53 if (trace_is_err_output(output)) { 54 trace_perror_output(output,"trace_create"); 55 return 1; 56 } 57 if (trace_start_output(output)==-1) { 58 trace_perror_output(output,"trace_start"); 55 59 return 1; 56 60 } … … 63 67 struct libtrace_packet_t *p; 64 68 f=trace_create(argv[i+optind]); 69 if (trace_is_err(f)) { 70 trace_perror(f,"trace_create"); 71 return 1; 72 } 73 if (trace_start(f)==-1) { 74 trace_perror(f,"trace_start"); 75 return 1; 76 } 65 77 p=trace_create_packet(); 66 78 input[i]=f; 67 79 packet[i]=p; 68 if (!input[i]) {69 fprintf(stderr,"Could not read %s\n",argv[i+optind]);70 return 1;71 }72 80 trace_read_packet(f,p); 73 81 }
Note: See TracChangeset
for help on using the changeset viewer.
