[PATCH] config-parser: Honor the XDG_CONFIG_DIRS environment variable
Daniel Stone
daniel at fooishbar.org
Mon May 13 07:37:53 PDT 2013
Hi,
On 12 May 2013 16:54, Kristian Høgsberg <krh at 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
More information about the wayland-devel
mailing list