[lxc-devel] [PATCH] New approach to remove container entry from lxc_snapshots (v3)

2015-09-11 Thread Christian Brauner
I want to avoid having to use the GNU-extension memmem() when removing the container entry. As mmap() does not guarantee us a \0-terminated string we pwrite() a single terminating \0-byte after the end of the file and the mmap() the file. The terminating \0-byte will then be removed when we

[lxc-devel] [PATCH] New approach to remove container entry from lxc_snapshots

2015-09-09 Thread Christian Brauner
I want to avoid having to use the GNU-extension memmem() when removing the container entry. As mmap() does not guarantee us a \0-terminated string we lseek() to the end of the file and write() a single terminating \0-byte to the file and the mmap() the file. The terminating \0-byte will then be

[lxc-devel] [PATCH] New approach to remove container entry from lxc_snapshots (v2)

2015-09-09 Thread Christian Brauner
I want to avoid having to use the GNU-extension memmem() when removing the container entry. As mmap() does not guarantee us a \0-terminated string we pwrite() a single terminating \0-byte after the end of the file and the mmap() the file. The terminating \0-byte will then be removed when we