Systemd/src/readahead
Lennart Poettering 03e334a1c7 util: replace close_nointr_nofail() by a more useful safe_close()
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.
2014-03-18 19:31:34 +01:00
..
Makefile build-sys: add stub makefiles to subdirs 2012-01-05 16:29:21 +01:00
readahead-analyze.c readahead: fix format string issue 2013-04-25 21:50:48 -04:00
readahead-collect.c util: replace close_nointr_nofail() by a more useful safe_close() 2014-03-18 19:31:34 +01:00
readahead-common.c util: replace close_nointr_nofail() by a more useful safe_close() 2014-03-18 19:31:34 +01:00
readahead-common.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
readahead-replay.c util: replace close_nointr_nofail() by a more useful safe_close() 2014-03-18 19:31:34 +01:00
readahead.c clients: unify how we invoke getopt_long() 2013-11-06 18:28:39 +01:00
sd-readahead.c errno is positive 2013-04-11 19:13:18 -04:00