summaryrefslogtreecommitdiff
path: root/src/gpt-auto-generator
AgeCommit message (Collapse)Author
2016-10-22tree-wide: make parse_proc_cmdline() strip "rd." prefix automaticallyZbigniew Jędrzejewski-Szmek
This stripping is contolled by a new boolean parameter. When the parameter is true, it means that the caller does not care about the distinction between initrd and real root, and wants to act on both rd-dot-prefixed and unprefixed parameters in the initramfs, and only on the unprefixed parameters in real root. If the parameter is false, behaviour is the same as before. Changes by caller: log.c (systemd.log_*): changed to accept rd-dot-prefix params pid1: no change, custom logic cryptsetup-generator: no change, still accepts rd-dot-prefix params debug-generator: no change, does not accept rd-dot-prefix params fsck: changed to accept rd-dot-prefix params fstab-generator: no change, custom logic gpt-auto-generator: no change, custom logic hibernate-resume-generator: no change, does not accept rd-dot-prefix params journald: changed to accept rd-dot-prefix params modules-load: no change, still accepts rd-dot-prefix params quote-check: no change, does not accept rd-dot-prefix params udevd: no change, still accepts rd-dot-prefix params I added support for "rd." params in the three cases where I think it's useful: logging, fsck options, journald forwarding options.
2016-10-22tree-wide: allow state to be passed through to parse_proc_cmdline_itemZbigniew Jędrzejewski-Szmek
No functional change.
2016-07-25Merge pull request #3757 from poettering/efi-searchZbigniew Jędrzejewski-Szmek
2016-07-22Use "return log_error_errno" in more places"Zbigniew Jędrzejewski-Szmek
2016-07-21gpt-generator: relax EFI check a bitLennart Poettering
Previously, we'd not mount the ESP except on EFI boots, and only when the ESP used for booting matches the ESP we found. With this change on non-EFI boots we'll mount a discovered ESP anyway, and on EFI boots we'll only mount it if it matches the ESP we booted from.
2016-07-21gpt-generator: use /efi as mount point for the ESP if it existsLennart Poettering
Let's make the EFI generator a bit smarter: if /efi exists it is used as mount point for the ESP, otherwise /boot is used. This should increase compatibility with distros which use legacy boot loaders that insist on having /boot as something that isn't the ESP.
2016-05-12Create initrd-root-device.target synchronization point (#3239)Daniel Drake
Add a synchronization point so that custom initramfs units can run after the root device becomes available, before it is fsck'd and mounted. This is useful for custom initramfs units that may modify the root disk partition table, where the root device is not known in advance (it's dynamically selected by the generators).
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2016-02-03gpt-auto: handle errors from blkid more correctlyLennart Poettering
Let's make sure we don't choke if blkid_probe_lookup_value() returns a NULL string. Also, make sur we propagate the correct error when blkid_probe_lookup_value() fails.
2016-02-01gpt-auto: don't log an EIO error if blkid finds something which is not a ↵Lennart Poettering
partition table Fixes: #2483
2015-11-17tree-wide: group include of libudev.h with sd-*Thomas Hindoe Paaboel Andersen
2015-11-16tree-wide: sort includesThomas Hindoe Paaboel Andersen
Sort the includes accoding to the new coding style.
2015-11-09treewide: apply errno.cocciMichal Schmidt
with small manual cleanups for style.
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch]Lennart Poettering
2015-10-27util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch]Lennart Poettering
2015-10-27util-lib: introduce dirent-util.[ch] for directory entry callsLennart Poettering
Also, move a couple of more path-related functions to path-util.c.
2015-10-27util-lib: move mount related utility calls to mount-util.[ch]Lennart Poettering
2015-10-27util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
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.
2015-10-06gpt-auto-generator: fix duplicate backing partition checkLennart Poettering
We shouldn't exit the loop early, otherwise our duplicate backing partition check won't work.
2015-09-30gpt-auto-generator: check fstab for /boot entriesKay Sievers
We need to prevent the creation of the gpt automount unit, which will not get overridden by the fstab mount unit. https://github.com/systemd/systemd/issues/1378
2015-09-08gpt-auto: fix ESP options and descriptionMarius Thesing
Since 59512f21 the parameters were passed in the wrong order, causing the options to be interpreted as the description. Also, while "false" was supposed to be passed for "rw", the ESP should actually be mounted read-write. It just happened to be "true" since the description char* was passed for "rw".
2015-09-07basic: rework virtualization detection APILennart Poettering
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.
2015-09-07gpt-auto: minor simplificatin handling the no-auto GPT flagLennart Poettering
Let's query the flags only once, and document why we ignore it for the ESP.
2015-09-07gpt-auto: try to handle LUKS root partitions betterLennart Poettering
If the root file system is located on an encrypted root disk, we'll not find the GPT partition table for it. Let's fix that by following the slaves/ symlinks in /sys for the device. We only handle devices having exactly one backing device. Also see: #1167
2015-08-11gpt-auto-generator: warn on ambiguous blkid probeTom Gundersen
2015-08-11gpt-auto-generator: don't warn on !ENABLE_EFITom Gundersen
add_automount() was only used on EFI systems, compile it conditionally to avoid the warning.
2015-08-11gpt-auto-generator: apply partition-type flags only to specific partition-typesKay Sievers
The partition-type flags are defined independently for every partition-type. Apply them only to the types where they are defined, and not to the ESP, which does not appear to share the same set of flags. https://github.com/systemd/systemd/issues/920
2015-08-04gpt-auto-generator: remove unused variableThomas Hindoe Paaboel Andersen
2015-07-30tree-wide: use free_and_strdup()Daniel Mack
Use free_and_strdup() where appropriate and replace equivalent, open-coded versions.
2015-07-29tree-wide: port everything over to fflush_and_check()Lennart Poettering
Some places invoked fflush() directly with their own manual error checking, let's unify all that by using fflush_and_check(). This also unifies the general error paths of fflush()+rename() file writers.
2015-07-29gpt-auto-generator: merge efi-boot-generatorKay Sievers
2015-07-06fileio: consolidate write_string_file*()Daniel Mack
Merge write_string_file(), write_string_file_no_create() and write_string_file_atomic() into write_string_file() and provide a flags mask that allows combinations of atomic writing, newline appending and automatic file creation. Change all users accordingly.
2015-05-29path-util: Change path_is_mount_point() symlink arg from bool to flagsMartin Pitt
This makes path_is_mount_point() consistent with fd_is_mount_point() wrt. flags.
2015-05-05core: rework unit name validation and manipulation logicLennart Poettering
A variety of changes: - Make sure all our calls distuingish OOM from other errors if OOM is not the only error possible. - Be much stricter when parsing escaped paths, do not accept trailing or leading escaped slashes. - Change unit validation to take a bit mask for allowing plain names, instance names or template names or an combination thereof. - Refuse manipulating invalid unit name
2015-04-12gpt-generator: Find device on a stateless systemTobias Hunger
A stateless system has a tmpfs as root file system. That obviously does not have any block device associated with it. So try falling back to the device of the /usr filesystem if the root filesystem fails.
2015-03-14gpt-auto-generator: prefix messages with device nameZbigniew Jędrzejewski-Szmek
2015-03-13gpt-auto-generator: allow type check to failZbigniew Jędrzejewski-Szmek
add_mount() is OK with unknow file type, but we have to initalize the variable to NULL not to pass garbage on error.
2015-03-13gpt-auto-generator: fix detection of /srvMathieu Chevrier
https://bugs.freedesktop.org/show_bug.cgi?id=89226
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
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.
2015-02-03util: rework strappenda(), and rename it strjoina()Lennart Poettering
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
2014-12-12gpt-auto-generator: make use of new btrfs-util.h APIsLennart Poettering
2014-11-28treewide: another round of simplificationsMichal Schmidt
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".
2014-11-28treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt
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.
2014-11-28treewide: more log_*_errno + return simplificationsMichal Schmidt
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-24gpt-auto-generator: properly ignore valueZbigniew Jędrzejewski-Szmek
A negative return code was treated as a true value.