summaryrefslogtreecommitdiff
path: root/src/readahead/readahead-common.c
AgeCommit message (Collapse)Author
2014-06-22readahead: avoid gcc warning about formatZbigniew Jędrzejewski-Szmek
src/readahead/readahead-common.c:55:17: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 7 has type ‘__off64_t’ [-Wformat=] log_debug("Not preloading file %s with size out of bounds %zu", fn, st->st_size); ^
2014-06-22consistently order cleanup attribute before typeThomas Hindoe Paaboel Andersen
2014-05-15Remove unnecessary casts in printfsZbigniew Jędrzejewski-Szmek
No functional change expected :)
2014-04-21implement a union to pad out file_handleDave Reisner
Cases where name_to_handle_at is used allocated the full struct to be MAX_HANDLE_SZ, and assigned this size to handle_bytes. This is wrong since handle_bytes should describe the length of the flexible array member and not the whole struct. Define a union type which includes sufficient padding to allow assignment of MAX_HANDLE_SZ to be correct.
2014-03-18util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering
safe_close() automatically becomes a NOP when a negative fd is passed, and returns -1 unconditionally. This makes it easy to write lines like this: fd = safe_close(fd); Which will close an fd if it is open, and reset the fd variable correctly. By making use of this new scheme we can drop a > 200 lines of code that was required to test for non-negative fds or to reset the closed fd variable afterwards.
2013-10-13Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek
2013-04-24readahead: be more verbose about creation failuresZbigniew Jędrzejewski-Szmek
systemd-readahead reports "Failed to create shared memory segment: No such file or directory", but it's unclear how it can happen. Be more verbose about failures.
2013-04-03util: rename write_one_line_file() to write_string_file()Lennart Poettering
You can write much more than just one line with this call (and we frequently do), so let's correct the naming.
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-13Revert "log_error() if inotify_add_watch() fails"Lennart Poettering
This reverts commit 2826d14091e43ed3397d862dee79d09d0115c84e. We never should generate log messages from a library.
2013-02-13log_error() if inotify_add_watch() failsHarald Hoyer
[zj: Reworded message s/to watch/to add watch on/ to make it clear that it was the watch init action that failed, and not the "process of watching". I think this way it'll be clearer to people who don't know what inotify does.]
2012-11-22readahead: properly detect btrfs on SSDLennart Poettering
2012-09-13readahead: use 20K instead of 16K as temporary request nr bumpLennart Poettering
2012-09-03readahead: a bit of reformattingLennart Poettering
2012-05-04readhead: temporarily lower the kernel's read_ahead_kb setting while collectingLennart Poettering
While collecting readahead data we want to know exactly what userspace accesses unblurred by the kernel's read_ahead_kb. Hence lower this during collection, and raise it afterwards. This is mostly based on ideas and code by Auke Kok.
2012-04-12relicense to LGPLv2.1 (with exceptions)Lennart Poettering
We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
2011-12-31build-sys: make readahead and vconsole optionalLennart Poettering