On Mon, 17 Jun 2019 09:37:22 -0400 Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > As stated in the last email. The vector size is hard coded as 2, which > is why I'm reluctant to add a vector version now. If it was dynamic, > then that would be more of a reason. Here we can just create our own > structure and use that: > > struct tracecmd_map_file { > int nr_maps; > int maps_len; > char *maps; > } > > Or something like that. As you can't send that to the tracecmd_add_option, you would need something more like this: struct tracecmd_map_file { int nr_maps; int maps_len; char maps[0]; }; And then you would need to copy it first before sending it: struct tracecmd_map_file *tmap; tmap = malloc(sizeof(*tmap) + s.len + 1); and copy the buffer: memcpy(&tmap->maps[0], s.buffer, s.len + 1); before sending it to tracecmd_add_option(); -- Steve