+static gboolean fs_open(void *hook_data, void *call_data)
+{
+ LttvTracefileState *s = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)s->parent.t_context;
+ LttEvent *e = ltt_tracefile_get_event(s->parent.tf);
+ LttvTraceHook *th = (LttvTraceHook *)hook_data;
+ struct marker_field *f;
+ guint cpu = s->cpu;
+ int fd;
+ char *filename;
+ LttvProcessState *process = ts->running_process[cpu];
+
+ f = lttv_trace_get_hook_field(th, 0);
+ fd = ltt_event_get_int(e, f);
+
+ f = lttv_trace_get_hook_field(th, 1);
+ filename = ltt_event_get_string(e, f);
+
+ g_hash_table_insert(process->fds, fd, g_quark_from_string(filename));
+
+ return FALSE;
+}
+