summaryrefslogtreecommitdiff
path: root/src/shared
AgeCommit message (Collapse)Author
2015-04-10shared: add process-util.[ch]Ronny Chevalier
2015-04-10shared: add formats-util.hRonny Chevalier
2015-04-10efivars: fix build for non-efiThomas Hindoe Paaboel Andersen
2015-04-10shared: boot-timestamps - remove ifdefTom Gundersen
No need to ifdef out efi code as the functions are always defined.
2015-04-10shared: efivars - fix compile on non-EFI systemsTom Gundersen
systemctl and logind were unconditionally using functions that were not compiled on non-EFI systems. Add stubs returning -EOPNOTSUPP to fix compile again.
2015-04-10shared: efivars - is_efi_*() returns bool instead of intTom Gundersen
There was a bug where is_efi_*() could return a negative error value, which would be treated as 'true', just make this a bool in the helper library to avoid the problem.
2015-04-10device-nodes: minor simplificationsLennart Poettering
2015-04-10util: unify how we parse mode_t stringsLennart Poettering
2015-04-10util: remove normalize_env_assignment(), it's unusedLennart Poettering
2015-04-10shared: fix memleakRonny Chevalier
path was used for 2 purposes but it was not freed before being reused.
2015-04-10util: mark unquote() static, so that new code doesn't use this anymoreLennart Poettering
2015-04-10util: fix unicode decoding in unquote_first_word()Lennart Poettering
2015-04-10util: when unescaping C escape sequences support C++11 \u and \U unicode ↵Lennart Poettering
literals We simply recode them in utf8.
2015-04-09util: fix a typo in commentThomas Hindoe Paaboel Andersen
2015-04-09util: cunescape - fix memleak in error pathRonny Chevalier
2015-04-09util: add shell_maybe_quote() call for preparing a string for shell cmdline ↵Lennart Poettering
inclusion If necessary the passed string is enclosed in "", and all special characters escapes. This also ports over usage in bus-util.c and job.c to use this, instead of a incorrect local implementation that forgets to properly escape.
2015-04-08util: merge change_attr_fd() and chattr_fd()Lennart Poettering
2015-04-08util: add minimal OrderedSet typeLennart Poettering
OrderedSet implements a Set-like structure, but maintains insertion ordered. It is hence to Set what OrderedHashmap is for Hashmap. Internally, this is only a wrapper around OrderedHashmap for now, but this could one day be improved and be added to hashmap.c natively.
2015-04-08missing.h: Define IFA_F_NOPREFIXROUTEAlexander Sverdlin
Fixes second systemd compilation problem against Linux 3.12 uapi headers. IFA_F_NOPREFIXROUTE is a usual #define appeared in Linux 3.14, so AC_CHECK_DECLS is not necessary.
2015-04-08remove duplicated includesRonny Chevalier
2015-04-07missing.h: define IFA_FLAGS if it is missingLennart Poettering
2015-04-07logind,systemctl: add reboot to EFI firmware supportJan Janssen
2015-04-07path-util: fix more path_is_mount e792e890f falloutLennart Poettering
2015-04-07util: rework cunescape(), improve error handlingLennart Poettering
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.
2015-04-07udev: input_id: tag accelerometers as ID_INPUT_ACCELEROMETERHans de Goede
input_id already (tries to) tag accelerometers as such, but this only works for absolute accelerometers. Recent kernels mark accelerometers through an input prop. Trust that prop and always tag devices with it with ID_INPUT_ACCELEROMETER. Note that detection by the prop bit works the same as the existing detection and will ensure that no other tags get set on the device.
2015-04-07udev: input_id: tag pointing sticks as ID_INPUT_POINTINGSTICKPeter Hutterer
Also referred to as trackpoint, trackstick. These are marked by recent kernels through an input prop. Forward that prop as udev property so userspace can easily determine whether there is a pointing stick present. These devices were previously marked as ID_INPUT_MOUSE, for backwards compatibility we keep that in place, the new property is an addition.
2015-04-06btrfs: add support for recursive btrfs snapshottingLennart Poettering
2015-04-06btrfs: missing endian conversion fixLennart Poettering
2015-04-06btrfs: make btrfs_subvol_snapshot() parameters a flags fieldLennart Poettering
2015-04-06btrfs: support recursively removing btrfs snapshotsLennart Poettering
2015-04-06machined: drop btrfs subvolumes when removing container imagesLennart Poettering
2015-04-06path-util: don't eat up ENOENT in path_is_mount_point()Lennart Poettering
There's no reason to eat up ENOENT, it should be OK to simply report the error back.
2015-04-06path-util: make sure fd_is_mount_point() returns true for root directoryLennart Poettering
2015-04-06rm-rf: add support for recursively removing btrfs subvolumesLennart Poettering
2015-04-06path-util: if parent can do name_to_handle() but relevant dir not, it's a ↵Lennart Poettering
mount point
2015-04-06rm-rf: never cross mount pointsLennart Poettering
2015-04-06util: rework rm_rf() logicLennart Poettering
- Move to its own file rm-rf.c - Change parameters into a single flags parameter - Remove "honour sticky" logic, it's unused these days
2015-04-01shared: set - make argument to set_remove() constTom Gundersen
2015-03-31ARM: detect-virt: detect QEMU/KVMAndrew Jones
QEMU/KVM guests do not have hypervisor nodes, but they do have fw-cfg nodes (since qemu v2.3.0-rc0). fw-cfg nodes are documented, see kernel doc Documentation/devicetree/bindings/arm/fw-cfg.txt, and therefore we should be able to rely on it in this detection. Unfortunately, we currently don't have enough information in the DT, or elsewhere, to determine if we're using KVM acceleration with QEMU or not, so we can only report 'qemu' at this time, even if KVM is in use. This shouldn't really matter in practice though, because if detect-virt is used interactively it will be clear to the user whether or not KVM acceleration is present by the overall speed of the guest. If used by a script, then the script's behavior should not change whether it's 'qemu' or 'kvm'. QEMU emulated guests and QEMU/KVM guests of the same type should behave identically, only the speed at which they run should differ.
2015-03-31ARM: detect-virt: detect XenAndrew Jones
2015-03-31detect-virt: use /proc/device-treeAndrew Jones
Kernel doc Documentation/ABI/testing/sysfs-firmware-ofw says that the /proc/device-tree symlink should be used, as opposed to directly accessing /sys/firmware/devicetree/base. The former is ABI, but not the later.
2015-03-27fix gcc warnings about uninitialized variablesHarald Hoyer
like: src/shared/install.c: In function ‘unit_file_lookup_state’: src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized] return r < 0 ? r : state; ^ src/shared/install.c:1796:13: note: ‘r’ was declared here int r; ^
2015-03-26util: rework word parsing and c unescaping codeLennart Poettering
When parsing words from input files, optionally automatically unescape the passed strings, controllable via a new flags parameter. Make use of this in tmpfiles, and port everything else over, too. This improves parsing quite a bit, since we no longer have to process the same string multiple times with different calls, where an earlier call might corrupt the input for a later call.
2015-03-25fstab-generator: don't accept missing root=, but accept root=noneTobias Hunger
And other non-device entries (like fstab does). Mount whatever the user asked to be mounted on / on the kernel command line. Do less sanity check and do *not* bail out when the mount device looks strange or does not exist. This basically makes the changes for deviceless filesystems from yesterday unnecessary and is in line with what we do for filesystems set up in fstab. Remove some code that is now dead (reverting fb02a2775a65 and b0438462). [tomegun: - change patch title/description a bit. - don't touch the /usr logic, that would be a separate change and we don't currently have a convincing use-case for that. - don't bail out on /sys ro. This only makes sense in containers, where we would not be doing this anyway. If there is a use-case we could consider that as a separate patch.]
2015-03-24timedate: remove daylight saving time handling and tzfile parserKay Sievers
We planned to support (the conceptually broken) daylight saving time/local time features in the kernel, SCSI, networking, FAT filesystem, but it turned out to be a race we cannot win and do not want to get involved. Systemd should not fiddle with daylight saving time or parse timezone information itself. Leave everything to glibc or tools like date(1) and do not make any promises or raise expectations that systemd should handle anything like this.
2015-03-24fstab-generator: Do not check deviceless filesystemsTobias Hunger
There is no need to check those.
2015-03-24fstab-generator: Support root on tmpfs (or other deviceless FS)Tobias Hunger
This allows for stateless systems.
2015-03-21missing.h: add more btrfs types and definesMichael Olbrich
2015-03-21shared/mkdir: do not set errno in addition to return valueZbigniew Jędrzejewski-Szmek
All callers look at the return value anyway.
2015-03-19Add change_attr_fd()Goffredo Baroncelli
Add change_attr_fd() function to modify the file/directory attribute.