summaryrefslogtreecommitdiff
path: root/src/fsck
AgeCommit message (Collapse)Author
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
2014-11-07util: simplify proc_cmdline() to reuse get_process_cmdline()Lennart Poettering
Also, make all parsing of the kernel cmdline non-fatal.
2014-10-22fsck: re-enable fsck -lKarel Zak
The -l (lock) has been temporary disabled due to conflict with udev (https://bugs.freedesktop.org/show_bug.cgi?id=79576) The problem is fixed since util-linux v2.25 (Jul 2014).
2014-08-04bus: always explicitly close bus from main programsLennart Poettering
Since b5eca3a2059f9399d1dc52cbcf9698674c4b1cf0 we don't attempt to GC busses anymore when unsent messages remain that keep their reference, when they otherwise are not referenced anymore. This means that if we explicitly want connections to go away, we need to close them. With this change we will no do so explicitly wherver we connect to the bus from a main program (and thus know when the bus connection should go away), or when we create a private bus connection, that really should go away after our use. This fixes connection leaks in the NSS and PAM modules.
2014-06-25fsck: consider a fsck implementation linked to /bin/true non-existantLennart Poettering
2014-06-19stop complaining about unknown kernel cmdline optionsLennart Poettering
Also stop warning about unknown kernel cmdline options in the various tools, not just in PID 1
2014-06-04fsck: disable "-l" option for nowKay Sievers
https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5
2014-05-30fsck: include device name in the message about missing fsckZbigniew Jędrzejewski-Szmek
2014-05-16fsck: Allow to specify the fsck repair option in the cmdlineHolger Hans Peter Freyther
Some unattended systems do not have a console attached and entering the default rescue mode will not be too helpful. Allow to specify the "-y" option to attempt to fix all filesystem errors. Manually verified by downloading an image.gz of e2fsprogs, using losetup and running systemd-fsck on the loop device and varying the fsck.repair=preen|yes|no option.
2014-04-12fsck: Search for fsck.type in PATHMike Gilbert
Modifies find_binary() to accept NULL in the second argument. fsck.type lookup logic moved to new fsck_exists() function, with a test.
2014-03-24util: replace close_pipe() with new safe_close_pair()Lennart Poettering
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...
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.
2014-03-06util: move more intellegince into parse_proc_cmdline()Lennart Poettering
Already split variable assignments before invoking the callback. And drop "rd." settings if we are not in an initrd.
2014-02-17Extract looping over /proc/cmdline into a shared functionZbigniew Jędrzejewski-Szmek
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.
2014-02-13everywhere: always use O_CLOEXEC where it makes senseLennart Poettering
2013-12-26systemctl: simplify start_unitZbigniew Jędrzejewski-Szmek
2013-11-15fsck,fstab-generator: be lenient about missing fsck.<type>Zbigniew Jędrzejewski-Szmek
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.
2013-11-15fsck: modernizationZbigniew Jędrzejewski-Szmek
2013-11-06util: unify reading of /proc/cmdlineLennart Poettering
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.
2013-10-30general: various cleanupsLennart Poettering
2013-10-30bus: move ssh support into public API of libsystem-busLennart Poettering
2013-10-18fsck: port to sd-busTom Gundersen
2013-10-13Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek
2013-04-01Do no isolate in case of emergency or severe problemsDr. Tilmann Bubeck
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
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-01-04fsck: remove distro specific hacks from fsck/quotacheckLennart Poettering
Move forcefsck file checks under a HAVE_SYSV_COMPAT #ifdef, and warn if this is used.
2012-07-26log.h: new log_oom() -> int -ENOMEM, use itShawn Landden
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
2012-07-25use "Out of memory." consistantly (or with "\n")Shawn Landden
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
2012-06-22cryptsetup: allow configuration of LUKS disks via the kernel cmdlineLennart Poettering
This generalizes a bit of the functionality already available in dracut.
2012-04-13build-sys: add stub makefiles to all subdirs to ease development with emacsLennart Poettering
2012-04-12move all tools to subdirsKay Sievers