| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
We ought to be including this from each .c file.
|
| |
|
|
|
|
|
| |
Many fixes for typos but also some adjustments for the recent
refactoring (particularly updating HACKING).
|
|
|
|
| |
Provide a link to the bug with a justification for the unusual code.
|
|
|
|
|
| |
On OpenBSD, mapping descriptors PROT_WRITE without also specifying
PROT_READ triggers a segfault.
|
|
|
|
|
|
|
|
|
|
| |
Clean up the Makefiles and make them as similar as possible.
Move CFLAGS to a common point of definition and stop using -I so much.
Replace the 'dbus stub' with libdconf-mock.a in tests/. Fill in some
stubs for future mock code for shm and gvdb (just to get things
compiling for now).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After doing some research it has been discovered that ftruncate() isn't
sufficient for allocating space for a file. It can create a sparse file
and you don't find out that the space doesn't exist until you get a
SIGBUS later upon trying to write to the mmap region.
posix_fallocate() isn't doing quite what we want either (due to a flaky
glibc emulation of it when the native syscall is unavailable -- which is
the case for tmpfs).
Use a workaround based on pwrite() instead.
Also: mmap() really can't fail here except in the cases where we would
also abort due to g_malloc() failing, so we should just abort too.
|
|
Remove the shm code from the engine and the service and put it in a
separate convenience library in shm/.
Remove the vestigial shmdir weirdness from the service (since shmdir is
now always relative to XDG_RUNTIME_DIR and has been for some time).
The purpose of this is so that dconf-engine can be properly unit-tested.
dconf-engine now has five points of contact with the world (excluding
the users of the engine themselves):
- the DCONF_PROFILE environment variable
- fopen() of profile files
- shm
- gvdb
- dbus
The environment variable is quite easily controlled. fopen() is
intercepted in the engine testcase with a interpose of the libc symbol.
With this commit now each of dbus, gvdb and shm are implemented in
separate utility modules that can be mocked from the testcases.
|