summaryrefslogtreecommitdiffstats
path: root/src/fsck (follow)
Commit message (Collapse)AuthorAgeFilesLines
* util: replace close_pipe() with new safe_close_pair()Lennart Poettering2014-03-241-1/+1
| | | | | | safe_close_pair() is more like safe_close(), except that it handles pairs of fds, and doesn't make and misleading allusion, as it works similarly well for socketpairs() as for pipe()s...
* util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering2014-03-181-6/+3
| | | | | | | | | | | | | | | 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.
* util: move more intellegince into parse_proc_cmdline()Lennart Poettering2014-03-061-13/+18
| | | | | Already split variable assignments before invoking the callback. And drop "rd." settings if we are not in an initrd.
* Extract looping over /proc/cmdline into a shared functionZbigniew Jędrzejewski-Szmek2014-02-171-31/+17
| | | | | | | In cryptsetup-generator automatic cleanup had to be replaced with manual cleanup, and the code gets a bit longer. But existing code had the issue that it returned negative values from main(), which was wrong, so should be reworked anyway.
* everywhere: always use O_CLOEXEC where it makes senseLennart Poettering2014-02-131-1/+1
|
* systemctl: simplify start_unitZbigniew Jędrzejewski-Szmek2013-12-261-2/+2
|
* fsck,fstab-generator: be lenient about missing fsck.<type>Zbigniew Jędrzejewski-Szmek2013-11-161-8/+32
| | | | | | | | | | | | | If fstab contains 1 for passno, treat this as an error, but only warn briefly. If fstab doesn't contain this information, don't complain at all. Patch is complicated a bit by the fact that we might have the fstype specified in fstab or on /proc/cmdline, in which case we can check if we have the appropriate fsck tool, or not specified, or specified as auto, in which case we have to look and check the type of the filesystem ourselves. It cannot be done before the device appears, so it is too early in the generator phase, and it must be done directly in fsck service.
* fsck: modernizationZbigniew Jędrzejewski-Szmek2013-11-161-25/+18
|
* util: unify reading of /proc/cmdlineLennart Poettering2013-11-061-8/+4
| | | | | | Instead of individually checking for containers in each user do this once in a new call proc_cmdline() that read the file only if we are not in a container.
* general: various cleanupsLennart Poettering2013-10-301-9/+4
|
* bus: move ssh support into public API of libsystem-busLennart Poettering2013-10-301-1/+1
|
* fsck: port to sd-busTom Gundersen2013-10-181-47/+24
|
* Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek2013-10-131-9/+4
|
* Do no isolate in case of emergency or severe problemsDr. Tilmann Bubeck2013-04-021-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes local-fs.target and systemd-fsck to not use "isolate" when going into emergency. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=810722 The motivation is, that when something wents wrong, we should keep everything as it is, to let the user fix the problem. When isolating we stop a lot of services and therefore change the system heavily so that it gets harder for the user to fix. An example is a crypted partition. When the fsck in a crypted partition fails, it previously used "emergency/start/isolate" which stops cryptsetup. Therefore if the user tries to fsck e.g. /dev/mapper/luks-356c20ae-c7a2-4f1c-ae1d-1d290a91b691 as printed by the failing fsck, then it will not find this device (because it got closed). So please apply this patch to let the user see the failing situation. Thanks! [zj: removed dead isolate param from start_target().] https://bugs.freedesktop.org/show_bug.cgi?id=49463 https://bugzilla.redhat.com/show_bug.cgi?id=810722
* honor SELinux labels, when creating and writing config filesHarald Hoyer2013-02-141-0/+1
| | | | | | | 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
* fsck: remove distro specific hacks from fsck/quotacheckLennart Poettering2013-01-041-5/+14
| | | | Move forcefsck file checks under a HAVE_SYSV_COMPAT #ifdef, and warn if this is used.
* log.h: new log_oom() -> int -ENOMEM, use itShawn Landden2012-07-261-1/+1
| | | | | | also a number of minor fixups and bug fixes: spelling, oom errors that didn't print errors, not properly forwarding error codes, few more consistency issues, et cetera
* use "Out of memory." consistantly (or with "\n")Shawn Landden2012-07-251-1/+1
| | | | | | | | glibc/glib both use "out of memory" consistantly so maybe we should consider that instead of this. Eliminates one string out of a number of binaries. Also fixes extra newline in udev/scsi_id
* cryptsetup: allow configuration of LUKS disks via the kernel cmdlineLennart Poettering2012-06-221-3/+4
| | | | This generalizes a bit of the functionality already available in dracut.
* build-sys: add stub makefiles to all subdirs to ease development with emacsLennart Poettering2012-04-131-0/+1
|
* move all tools to subdirsKay Sievers2012-04-121-0/+406