Hi, On 12 May 2013 16:54, Kristian Høgsberg <k...@bitplanet.net> wrote: > I think we can change the interface to int open_config_file(const char > *), which looks up and opens the config file and returns the fd. We > can keep that in weston_compositor instead of the config_file path. > The parse function can then fseek on the fd to reset to the beginning > of the file. Going forward, we'll do something like this:
Totally. I've actually got a patch which looks in $sysconfdir and $datadir as well, enabling global fallback config files to be shipped, which I guess should be combined with this. When I looked at that, my next step was going to be returning an fd, but then I remembered that fds have no fgets() equivalent and totally lost interest in open-coding that. But it would be a much better result, particularly as mine open()s the files to verify they're accessible anyway ... Cheers, Daniel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel