summaryrefslogtreecommitdiff
path: root/src/core/umount.c
Commit message (Collapse)AuthorAge
* use more _cleanup_ macroRonny Chevalier2014-06-24
|
* umount: modernizationsLennart Poettering2014-06-05
|
* util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering2014-03-18
| | | | | | | | | | | | | | | 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.
* core: more exact test on the procfs special string "(deleted)"Jan Engelhardt2014-02-17
| | | | | In other parts of systemd, the code checks for " (deleted)", but in one instance, it did not (yet). Make it do the same.
* core,logind: libudev usage modernizationsLennart Poettering2013-12-18
| | | | Always use cleanup logic and don't eat up errors returned by libudev
* list: make our list macros a bit easier to use by not requring type spec on ↵Lennart Poettering2013-10-14
| | | | | | | 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.
* Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek2013-10-13
|
* move _cleanup_ attribute in front of the typeHarald Hoyer2013-04-18
| | | | http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
* Fix spelling errors using 'codespell' toolAnatol Pomozov2013-04-15
|
* Use initalization instead of explicit zeroingZbigniew Jędrzejewski-Szmek2013-04-05
| | | | | | | | | | | | | | | | | | | | | | | 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.
* ModernizationZbigniew Jędrzejewski-Szmek2013-03-31
| | | | Use _cleanup_ and wrap lines to ~80 chars and such.
* shutdown: loop - convert to enumerate matchKay Sievers2013-01-20
|
* shutdown: ignore loop devices without a backing fileKay Sievers2013-01-16
|
* shutdown: in the final umount loop don't use MNT_FORCELennart Poettering2013-01-16
| | | | | | | | 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.
* shutdown, umount: use verbs consistentlyMichal Schmidt2012-12-07
| | | | | | | | 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.
* shutdown, umount: logging improvementsMichal Schmidt2012-12-07
| | | | | | | | | 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).
* umount: fix check for DM changedMichal Schmidt2012-12-07
| | | | | 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.
* shutdown: fix typoHermann Gausterer2012-11-28
|
* shutdown: don't consider umounting of / and /usr failedTom Gundersen2012-11-28
| | | | | | | | | | | | | | | | | 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>
* umount: always remount read-only before unmounting in final shutdown loopLennart Poettering2012-11-16
|
* shutdown: don't attempt read-only mounts in a containerLennart Poettering2012-09-03
|
* umount: MS_MGC_VAL is so 90sLennart Poettering2012-08-13
|
* shutdown: Don't skip bind mounts on shutdownDaniel Drake2012-05-30
| | | | | | | | | | | | | | 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
* util: split-out path-util.[ch]Kay Sievers2012-05-08
|
* shutdown: move shutdown to core since it replaces PID 1Lennart Poettering2012-04-12