- trace_sec.size = lseek(fd, 0, SEEK_CUR) - trace_sec.offset;
-
- /* Write trace info headers */
- lseek(fd, cur_offset, SEEK_SET);
- do_write(fd, &trace_sec, sizeof(trace_sec));
-
- /*
- * Update cur_offset. So that other (future)
- * features can set their own infos in this place. But if we are
- * the only feature, at least that seeks to the place the data
- * should begin.
- */
- cur_offset = lseek(fd, trace_sec.offset + trace_sec.size, SEEK_SET);