b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
b4bbcaa9c44260e88402cb8f9a5fb8ac7f35e123 |
|
17-Nov-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
tree-wide: group include of libudev.h with sd-* |
cf0fbc49e67b55f8d346fc94de28c90113505297 |
|
16-Nov-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
tree-wide: sort includes
Sort the includes accoding to the new coding style. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
471b48ed2ff6539e7071ff4694c03483c5835639 |
|
26-Oct-2015 |
Jan Janssen <medhefgo@web.de> |
unmount: Pass in mount options when remounting read-only
man 2 mount says that the mountflags and data parameteres should
match the original values except for the desired changes. We only
bother with the mount options since the only flags we can change
are MS_RDONLY, MS_SYNCHRONOUS and MS_MANDLOCK; which shouldn't
matter too much.
Fixes: #351 |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files. |
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out escaping code into escape.[ch]
This really deserves its own file, given how much code this is now. |
75f86906c52735c98dc0aa7e24b773edb42ee814 |
|
07-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
basic: rework virtualization detection API
Introduce a proper enum, and don't pass around string ids anymore. This
simplifies things quite a bit, and makes virtualization detection more
similar to architecture detection. |
034e10d7fb8bd3d574bc4861f84cf4a86c343bf2 |
|
12-Jun-2015 |
Susant Sahani <susant@redhat.com> |
core: fix CID 996302
CID 996302: Error handling issues (CHECKED_RETURN) |
527b7a421ff3927d4f3f170b1b143452e88ae1dc |
|
07-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework cunescape(), improve error handling
Change cunescape() to return a normal error code, so that we can
distuingish OOM errors from parse errors.
This also adds a flags parameter to control whether "relaxed" or normal
parsing shall be done. If set no parse failures are generated, and the
only reason why cunescape() can fail is OOM. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
874d3404cbf2363604106c8f86683db4082691ea |
|
23-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
core,shutdown: don't bother with unmounting any mounts below /sys, /proc, /dev when shutting down
After all, mounts below these directories are pretty much guaranteed to
be virtual, and it's hence unnecessary to unmount them during shutdown.
Moreover, in less-priviliged containers we might lack the rights to
unmount them, hence don't even try.
http://lists.freedesktop.org/archives/systemd-devel/2015-January/027113.html |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
e1d758033dc7e101ab32323a0f1649d8daf56a22 |
|
24-Jun-2014 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
use more _cleanup_ macro |
c3544e8d2c2d870a2aff0944aff4ab7824b9ae6b |
|
05-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
umount: modernizations |
03e334a1c7dc8c20c38902aa039440763acc9b17 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
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. |
a87f0f726ca6dc9fde11eea6591a244e77d2d182 |
|
18-Feb-2014 |
Jan Engelhardt <jengelh@inai.de> |
core: more exact test on the procfs special string "(deleted)"
In other parts of systemd, the code checks for " (deleted)",
but in one instance, it did not (yet). Make it do the same. |
06acf2d46a38bec212d78094e6ef8b100679048a |
|
18-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
core,logind: libudev usage modernizations
Always use cleanup logic and don't eat up errors returned by libudev |
71fda00f320379f5cbee8e118848de98caaa229d |
|
14-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
list: make our list macros a bit easier to use by not requring type spec on each invocation
We can determine the list entry type via the typeof() gcc construct, and
so we should to make the macros much shorter to use. |
1ca208fb4f93e5869704af1812cbff7130a2fc03 |
|
13-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Introduce udev object cleanup functions |
7fd1b19bc9e9f5574f2877936b8ac267c7706947 |
|
18-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html |
ab06eef8101866dd1337c4759002f7360a9db416 |
|
15-Apr-2013 |
Anatol Pomozov <anatol.pomozov@gmail.com> |
Fix spelling errors using 'codespell' tool |
b92bea5d2a9481de69bb627a7b442a9f58fca43d |
|
06-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use initalization instead of explicit zeroing
Before, we would initialize many fields twice: first
by filling the structure with zeros, and then a second
time with the real values. We can let the compiler do
the job for us, avoiding one copy.
A downside of this patch is that text gets slightly
bigger. This is because all zero() calls are effectively
inlined:
$ size build/.libs/systemd
text data bss dec hex filename
before 897737 107300 2560 1007597 f5fed build/.libs/systemd
after 897873 107300 2560 1007733 f6075 build/.libs/systemd
… actually less than 1‰.
A few asserts that the parameter is not null had to be removed. I
don't think this changes much, because first, it is quite unlikely
for the assert to fail, and second, an immediate SEGV is almost as
good as an assert. |
e62d8c3944745ed276e6d4f33153009860e5cfc5 |
|
31-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Modernization
Use _cleanup_ and wrap lines to ~80 chars and such. |
e1af7092a8e124eff5f7a668f0f1562c4df4b02f |
|
20-Jan-2013 |
Kay Sievers <kay@vrfy.org> |
shutdown: loop - convert to enumerate match |
bdffb521d01a2e2bc342154d74cb519755c52c25 |
|
16-Jan-2013 |
Kay Sievers <kay@vrfy.org> |
shutdown: ignore loop devices without a backing file |
0c08f5cde749bd2818475e487109cd0d413452df |
|
16-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
shutdown: in the final umount loop don't use MNT_FORCE
MNT_FORCE is honoured by NFS and FUSE and allows unmounting of the FS
even if consumers still use it. For our brute-force loop we rely on
EBUSY being reported as long as a file system is still used by a
loopback device or suchlike. Hence, drop MNT_FORCE to make EBUSY
reliable. |
735e0712710a1dc26da0febafb91b242b2687f3f |
|
07-Dec-2012 |
Michal Schmidt <mschmidt@redhat.com> |
shutdown, umount: use verbs consistently
Mounts are "unmounted".
Swaps are "deactivated", not "turned off" nor "disabled".
Loop and DM devices are "detached", not "deleted".
Especially the deleting sounded a bit scary. |
bce93b7ac7642426039863493694d8c12812e2a7 |
|
07-Dec-2012 |
Michal Schmidt <mschmidt@redhat.com> |
shutdown, umount: logging improvements
In bugreports about hangs during the late shutdown we are often missing
important information - what were we trying to unmount/detach when it hung.
Instead of printing what we successfully unmounted, print what we are
going to unmount/detach. And add messages to mark the completion of
categories (mount/swap/loop/DM). |
c678406681d32d56730b9e9c002d5500d7aa7f8b |
|
07-Dec-2012 |
Michal Schmidt <mschmidt@redhat.com> |
umount: fix check for DM changed
delete_dm() returns 0 on success. The check for "r > 0" was likely
a copy&paste error from the loopback code where "r > 0" makes sense. |
5a6f9d23300a35d916f26c9dfa2da101311ce217 |
|
28-Nov-2012 |
Hermann Gausterer <git-systemd-2012@mrq1.org> |
shutdown: fix typo |
140883405e429d9f8d3480a2701d8904f97e4a98 |
|
28-Nov-2012 |
Tom Gundersen <teg@jklm.no> |
shutdown: don't consider umounting of / and /usr failed
In the words of Homer: If you don't try, you can't fail.
This is a revert of 9279749b84cc87c7830280b7895a48bed03c9429.
It used to be necessary to consider the umounting failed to make sure /
and /usr were remounted read-only, but that is no longer necessary as
everything is now remounted read-only anyway.
Moreover, this avoids a warning at shutdown saying a filesystem was not
unmounted. As the umounting of / is never attempted there was no
corresponding warning message saying which fs that failed. This caused some
spurious bug-reports from concerned users.
Cc: Michael Biebl <biebl@debian.org> |
93bd157722c76b47d80742f290373c1ce2865070 |
|
16-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
umount: always remount read-only before unmounting in final shutdown loop |
024f268d634159849e642e7005871739c428524d |
|
04-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
shutdown: don't attempt read-only mounts in a container |
8caf9d6836c3ed5b7bb4c1ea8dea5241a634c298 |
|
13-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
umount: MS_MGC_VAL is so 90s |
7c49259fc8f63ade6cb212a43477d7030aaaf423 |
|
30-May-2012 |
Daniel Drake <dsd@laptop.org> |
shutdown: Don't skip bind mounts on shutdown
This reverts commits d72238fcb34abc81aca97c5fb15888708ee937d3 and
f3accc08.
OLPC runs / as a bind-mount, so this must be remounted RO during
shutdown to avoid corruption.
As Lennert can't recall the exact reasons for making the shutdown
code skip bind mounts, revert to previous behaviour to solve the
issue for OLPC.
http://lists.freedesktop.org/archives/systemd-devel/2012-April/004957.html |
9eb977db5b89b44f254ab40c1876a76b7d7ea2d0 |
|
08-May-2012 |
Kay Sievers <kay@vrfy.org> |
util: split-out path-util.[ch] |
146de8175e11c877908f20f8ed1b5a3805455c0a |
|
12-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
shutdown: move shutdown to core since it replaces PID 1 |