summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* terminal: add term.h header for library usersDavid Herrmann2014-10-02
| | | | | Like all the other parts of libsystemd-terminal, split API of term-internal.h into term.h so we can use it from systemd-consoled.
* terminal: move unifont-map to datadirDavid Herrmann2014-10-02
| | | | | | Lets avoid putting stuff into /usr/shared/unifont/, but keep it in /usr/share/systemd/. Upstream lacks interest in this, so don't bother for now.
* terminal: add unifont_get_width/height()David Herrmann2014-10-02
| | | | | Allow unifont users to retrieve the width and height of unifont glyphs. In version 1 this is hard-coded as 8/16, but may be changed in the future.
* terminal: move unifont-internal.h to unifont.hDavid Herrmann2014-10-02
| | | | | | All the definitions are for outside users, so drop the -internal suffix. Internal definitions are in unifont-def.h and unifont.c, no need to share those.
* sd-bus: use terms from the D-Bus Specification a bit moreSimon McVittie2014-10-02
| | | | | | | | | | | | | | | | | | | D-Bus' type hierarchy as described in the spec is: \- basic \- fixed type (u, i, etc.) \- string-like type (s, o, g) \- container Someone seems to have referred to basic types as "simple types" at some point, but that term isn't defined in the D-Bus Specification, and seems redundant. So far I haven't renamed functions that use "trivial" in their names to mean "fixed type", to avoid confusion about whether a struct of constant length, like (iu), is a fixed type. The answer is that it is fixed-length, but is not a "fixed type", so I can see that something like bus_type_is_fixed() might be ambiguous.
* PORTING-DBUS1: we use :1.%llu not :0.%llu for D-Bus unique bus namesSimon McVittie2014-10-02
|
* core/swap: only make configured units part of swap.targetZbigniew Jędrzejewski-Szmek2014-10-02
| | | | | | | | | | | | | | | | | | | | We used to make all .swap units either RequiredBy=swap.target or WantedBy=swap.target. But swap.target should be the "configured swap units", either through /etc/fstab or non-generated .swap units. It is surprising when systemd starts treating a swap device that was possibly temporarily enabled as a hard dependency for other units. So do not add dependencies with swap.target for units gleaned from /proc/swaps. Similarly, we added dependencies for all aliases of the device name, which clutters up the dependency graph but does not seem to bring any value, since the status of those following units is consistent with the main one anyway. This should be a fix for [1], and it seems the right thing to do anyway. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1114786
* Remove repeated includesThomas Hindoe Paaboel Andersen2014-10-01
| | | | | | In pty.c there was both an include of our pty.h and the system installed pty.h. The latter contains only two functions openpty and forkpty. We use neither so I assume it was a typo and removed it. We still compile and pass all tests.
* tests: add tests for {hashmap,set}_steal_firstZbigniew Jędrzejewski-Szmek2014-10-01
| | | | Just to make sure that coverity is wrong.
* shared: util - use nicer idiom to silence CoverityZbigniew Jędrzejewski-Szmek2014-10-01
| | | | Change the other spot too.
* tmpfiles: use allocated buffer for pathZbigniew Jędrzejewski-Szmek2014-10-01
| | | | | | | Paths can in principle be longer then PATH_MAX, so simply allocate the buffer with malloc(). CID #1237773
* core: limit timestamp to sane precisionZbigniew Jędrzejewski-Szmek2014-10-01
| | | | Anything below .1 s is meaningless anyway.
* test-fileio: Remove dead checkThomas Hindoe Paaboel Andersen2014-09-30
| | | | t cannot be null here
* test-date: don't fail test if log_max_level is higher than LOG_INFOThomas Hindoe Paaboel Andersen2014-09-30
|
* test-path-util: fix a mem leak and avoid confusing coverityThomas Hindoe Paaboel Andersen2014-09-30
| | | | Found with coverity. Fixes CID#1237754 and #1237790
* vconsole: silence coverityThomas Hindoe Paaboel Andersen2014-09-30
| | | | | Let's silence coverity here too. There is not much to do if the ioctls to copy the fonts and character maps should fail.
* shared: util - use nicer idiom to silence CoverityTom Gundersen2014-09-30
| | | | Suggested by Zbigniew.
* core: execute - don't leak strvTom Gundersen2014-09-30
|
* util: silence coverityTom Gundersen2014-09-29
| | | | Make it clear in the code that ignoring a failed safe_ato?() is intentional.
* nspawn: log when tearing down of loop device failsTom Gundersen2014-09-29
|
* Do not format USEC_INFINITY as NULLZbigniew Jędrzejewski-Szmek2014-09-29
| | | | | | | | | | | systemctl would print 'CPUQuotaPerSecUSec=(null)' for no limit. This does not look right. Since USEC_INFINITY is one of the valid values, format_timespan() could return NULL, and we should wrap every use of it in strna() or similar. But most callers didn't do that, and it seems more robust to return a string ("infinity") that makes sense most of the time, even if in some places the result will not be grammatically correct.
* core/dbus: simplify handling of CPUQuotaPerSecUSecZbigniew Jędrzejewski-Szmek2014-09-29
| | | | No functional change intended.
* core/swap: advertise Discard over dbusZbigniew Jędrzejewski-Szmek2014-09-29
|
* core/swap: follow the configured unit by defaultZbigniew Jędrzejewski-Szmek2014-09-29
| | | | | | | | | | | | Phenomenon: parameters configured in /etc/fstab for swap units are ignored. E.g. pri= settings have no effect when systemd starts swap units. What is even more confusing, .swap units for the name used in /etc/fstab initially show proper values for Priority=, but after starting them, they are re-initalized from /proc/swaps and show the -1 value from /proc/swaps. Change swap units to follow the original configured unit. This way proper settings are used when starting the swap.
* fstab-generator: properly deal with discard as non-last optionZbigniew Jędrzejewski-Szmek2014-09-29
| | | | | | | | Previous code would only return correct results when discard was the last option. While at it, avoid incorrect behaviour for (invalid) 'pri' option not followed by '=...', and also do not return -1 as the error code.
* swap: introduce Discard propertyJan Synacek2014-09-29
| | | | Process possible "discard" values from /etc/fstab.
* journal-remote: fix handling of non-blocking sourcesZbigniew Jędrzejewski-Szmek2014-09-29
| | | | | | | In the conversion to sd-event loop, handling of normal files got broken. We do not want to perform non-blocking reads on them, but simply do read() in a loop. Install a statically-enabled "source" to do that.
* journalctl: do not output --reboot-- markers when running non-interactivelyZbigniew Jędrzejewski-Szmek2014-09-29
| | | | They are not legal in the export format.
* bus: use 2M as maximum message size in benchmarkDavid Herrmann2014-09-29
| | | | | The kdbus limit is 2M and we removed the bus-owner override. Therefore, use at most 2M as message size.
* terminal: add helper to retrieve the seat of a sessionDavid Herrmann2014-09-29
| | | | Allow sysview users to retrieve the seat that a session is assigned to.
* bus: sync kdbus.h (ABI break!)David Herrmann2014-09-29
|
* terminal: add sysview_seat_switch_to()David Herrmann2014-09-29
| | | | | Add helper to perform session switches on a specific seat whenever we retrieve a VT-switch keyboard event.
* sd-bus: clean up string length calculationDaniel Mack2014-09-28
| | | | | Move the +1 calculus onto the definition of the variable, just to make the code a little easier to read. No functional change.
* bootchart: Do not try to access data for non-existing CPU'sPhilippe De Swert2014-09-28
| | | | | | | Cpu's are assigned normally, so starting at 0, so the MAX_CPU index will always be one smaller than the actual number. Found with Coverity.
* test-bus-policy: silence coverityThomas Hindoe Paaboel Andersen2014-09-28
| | | | | | | Check if strjoin worked and also use _cleanup_free_ since we are here. Found with Coverity. Fixes CID#1241962
* bootchart: check return of strftimeThomas Hindoe Paaboel Andersen2014-09-28
| | | | Found by coverity. Fixes: CID#996314 and #996312
* bootchart: parse userinput with safe_atoiThomas Hindoe Paaboel Andersen2014-09-28
| | | | Found by coverity. Fixes: CID#996409
* logind: add support for TPS65217 Power ButtonKoen Kooi2014-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PMIC is found on TI AM335x based boards like the beaglebone and beaglebone black. root@beaglebone-white:~# udevadm info -a /dev/input/event0 Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0/event0': KERNEL=="event0" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0': KERNELS=="input0" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{name}=="tps65217_pwr_but" ATTRS{phys}=="" ATTRS{uniq}=="" ATTRS{properties}=="0" looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024': KERNELS=="0-0024" SUBSYSTEMS=="i2c" DRIVERS=="tps65217" ATTRS{name}=="tps65217" looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0': KERNELS=="i2c-0" SUBSYSTEMS=="i2c" DRIVERS=="" ATTRS{name}=="OMAP I2C adapter" looking at parent device '/devices/ocp.3/44e0b000.i2c': KERNELS=="44e0b000.i2c" SUBSYSTEMS=="platform" DRIVERS=="omap_i2c" looking at parent device '/devices/ocp.3': KERNELS=="ocp.3" SUBSYSTEMS=="platform" DRIVERS==""
* shutdownd: clean up initialization of structThomas Hindoe Paaboel Andersen2014-09-27
| | | | | | No functional change. We just don't assign the value twice. Found by coverity. Fixes: CID#1237616 and #1237617
* test-bus-policy: load policy files from TEST_DIRDaniel Mack2014-09-26
| | | | | 'make distcheck' calls test-bus-policy outside of the source tree, so it must consider the TEST_DIR variable to access its files.
* systemd-tmpfiles: Fix IGNORE_DIRECTORY_PATH age handlingRichard Weinberger2014-09-26
| | | | | | | | | | | | | | | | | If one has a config like: d /tmp 1777 root root - X /tmp/important_mount All files below /tmp/important_mount will be deleted as the /tmp/important_mount item will spuriously inherit a max age of 0 from /tmp. /tmp has a max age of 0 but age_set is (of course) false. This affects also the PrivateTmp feature of systemd. All tmp files of such services will be deleted unconditionally and can cause service failures and data loss. Fix this by checking ->age_set in the IGNORE_DIRECTORY_PATH logic.
* make utmp/wtmp support configurableEmil Renner Berthing2014-09-26
| | | | | | This adds --disable-utmp option to configure. If it is used, all utmp-related functionality, including querying runlevel support, is removed.
* journal: build fix when LZ4 is enabled but XZ is notGustavo Sverzut Barbieri2014-09-25
|
* journal-remote: fix counting of events writtenZbigniew Jędrzejewski-Szmek2014-09-25
| | | | | | | | | | | After recent changes the number was always reported as 0, because the accounting was done server_destroy(), called after the message was already printed. But even before this change, the counts were wrong because seqnum start at 0 only for newly created journal files, so when appending to existing files, the calculated count was wrong anyway. Also do some variable renaming for consistency and disable some low-level debug messages.
* journal-remote: initialize writer hashmap before useJonathan Liu2014-09-25
| | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=83682 [zj: move the initalization even earlier, before any sockets are looked at.]
* nspawn: check some more return valuesTom Gundersen2014-09-25
| | | | | Most of these failures would anyway get caught later on, but now the error messages are a bit more specific.
* delta: warn if diff failedTom Gundersen2014-09-25
| | | | Found by Coverity. Fixes CID #1237541.
* readahead: wipe out readaheadDaniel Buch2014-09-25
|
* bus-proxy: drop one wrong assert()Tom Gundersen2014-09-25
|
* shared: path-util - try to make PATH_FORECH_PREFIX look less wrongTom Gundersen2014-09-25
| | | | | | | | | | We replace the idiom "X && !(*foo = 0)" with "X && ((*foo = 0), true)". This is not a functional change, but should hopefully make it less likely that people and static analyzers believe there is a typo here (i.e., to make it clear that the intention was not "X && *foo != 0"). Thanks to David Herrmann for the suggestion.