summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-09-16resolved: cache - clarify loggingTom Gundersen
2015-09-16Merge pull request #1278 from michich/nicer-assertsLennart Poettering
nicer assert messages
2015-09-16basic: nicer xsprintf and xstrftime assert messagesMichal Schmidt
It's nicer if the assertion failure message from a bad use of xsprintf actually mentions xsprintf instead of the expression the macro is implemented as. The assert_message_se macro was added in the previous commit as an internal helper, but it can also be used for customizing assertion failure messages like in this case. Example: char buf[10]; xsprintf(buf, "This is a %s message.\n", "long"); Before: Assertion '(size_t) snprintf(buf, ELEMENTSOF(buf), "This is a %s message.\n", "long") < ELEMENTSOF(buf)' failed at foo.c:6, function main(). Aborting. After: Assertion 'xsprintf: buf[] must be big enough' failed at foo.c:6, function main(). Aborting.
2015-09-16basic: nicer assert messagesMichal Schmidt
Make sure the assert expression is not macro-expanded before stringification. This makes several assertion failure messages more readable. As an example: assert(streq("foo", "bar")); I'd rather see this: Assertion 'streq("foo", "bar")' failed at foo.c:5, function main(). Aborting. ...than this, though awesome, incomprehensible truncated mess: Assertion '(__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (( "foo")) && __builtin_constant_p (("bar")) && (__s1_len = strlen (("foo")), __s2_ len = strlen (("bar")), (!((size_t)(const void *)((("foo")) + 1) - (size_t)(cons t void *)(("foo")) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((("bar") ) + 1) - (size_t)(const void *)(("bar")) == 1) || __s2_len >= 4)) ? __builtin_st rcmp (("foo"), ("bar")) : (__builtin_constant_p (("foo")) && ((size_t)(const voi d *)((("foo")) + 1) - (size_t)(const void *)(("foo")) == 1) && (__s1_len = strle n (("foo")), __s1_len < 4) ? (__builtin_constant_p (("bar")) && ((size_t)(const void *)((("bar")) + 1) - (size_t)(const void *)(("bar")) == 1) ? __builtin_strcm p (("foo"), ("bar")) : (__extension__ ({ const unsigned char *__s2 = (const unsi gned char *) (const char *) (("bar")); int __result = (((const unsigned char *) (const char *) (("foo")))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __ result = (((const unsigned char *) (const char *) (("foo")))[1] - __s2[1]); if ( __s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const cha r *) (("foo")))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = ((( const unsigned char *) (const char *) (("foo")))[3] - __s2[3]); } } __result; }) )) : (__builtin_constant_p (("bar")) && ((size_t)(const void *)((("bar")) + 1) - (size_t)(const void *)(("bar")) == 1) && (__s2_len = strlen (("bar")), __s2_len < 4) ? (__builtin_constant_p (("foo")) && ((size_t)(const void *)((("foo")) + 1 ) - (size_t)(const void *)(("foo")) == 1) ? __builtin_strcmp (("foo"), ("bar")) : (- (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (cons t char *) (("foo")); int __result = (((const unsigned char *) (const char *) ((" bar")))[0] - __s2[0]); if (__s2_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) (("bar")))[1] - __s2[1]); if (__s2_len > 1 && __ result == 0) { __result = (((const unsigned char *) (const char *) (("bar")))[2] - __s2[2]); if (__s2_len > 2 && __result == 0)
2015-09-16basic: make sure argument of ELEMENTSOF is an arrayMichal Schmidt
Using ELEMENTSOF on a pointer will result in a compilation error.
2015-09-15Merge pull request #1270 from frandieguez/masterDaniel Mack
Add Galician translations
2015-09-15Add Galician language to LINGUAS fileFran Dieguez
2015-09-15Added Galician translationsFran Dieguez
2015-09-14Merge pull request #1250 from g2p/masterLennart Poettering
Hook more properties for transient units
2015-09-14Merge pull request #1267 from ↵Daniel Mack
systemd-mailing-devs/1442233013-14985-1-git-send-email-hdegoede@redhat.com hwdb: Add Thinkpad X1 carbon 3rd gen to 70-pointingstick.hwdb
2015-09-14hwdb: Add Thinkpad X1 carbon 3rd gen to 70-pointingstick.hwdbHans de Goede
Like many other recent thinkpads the factory default pointingstick sensitivity on these devices is quite low, making the pointingstick very slow in moving the cursor. This extends the existing hwdb rules for tweaking the sensitivity to also apply to the X1 carbon 3rd gen model. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1200717
2015-09-14Merge pull request #1259 from martinpitt/masterDaniel Mack
keymap: Add Corsair K70
2015-09-14keymap: Add Corsair K70Martin Pitt
2015-09-13Merge pull request #1251 from poettering/cgroups-cleanupDaniel Mack
cgroups cleanup + other fixes
2015-09-13Merge pull request #1253 from victorenator/masterDaniel Mack
po: update Belarusian translation
2015-09-12po: update Belarusian translationViktar Vauchkevich
2015-09-11cgroup: unify how we invalidate cgroup controller settingsLennart Poettering
Let's make sure that we follow the same codepaths when adjusting a cgroup property via the dbus SetProperty() call, and when we execute the StartupCPUShares= effect.
2015-09-11transaction: clarify via void-casting that we ignore the pipe2() return ↵Lennart Poettering
value for a reason
2015-09-11core: invalidate idle pipe event source in manager_close_idle_pipe()Lennart Poettering
In all occasions when this function is called we do so anyway, so let's move this inside, to make things easier.
2015-09-11execute: fix return type from write()Lennart Poettering
2015-09-11execute: invalidate idle pipe after useLennart Poettering
Not strictly necessary, but makes clear the fds are invalidated. Make sure we do the same here as in most other cases.
2015-09-11core: allocate sets of startup and failed units on-demandLennart Poettering
There's a good chance we never needs these sets, hence allocate them only when needed.
2015-09-11timesyncd: fix how we print a PIDLennart Poettering
2015-09-11core: refactor cpu shares/blockio weight cgroup logicLennart Poettering
Let's stop using the "unsigned long" type for weights/shares, and let's just use uint64_t for this, as that's what we expose on the bus. Unify parsers, and always validate the range for these fields. Correct the default blockio weight to 500, since that's what the kernel actually uses. When parsing the weight/shares settings from unit files accept the empty string as a way to reset the weight/shares value. When getting it via the bus, uniformly map (uint64_t) -1 to unset. Open up StartupCPUShares= and StartupBlockIOWeight= to transient units.
2015-09-11util: remove ring.[ch] + pty.[ch] and testsLennart Poettering
This was used by consoled, which was removed, let's remove this too now.
2015-09-11TODOLennart Poettering
2015-09-11Hook more properties for transient unitsGabriel de Perthuis
systemd-run can now launch units with PrivateTmp, PrivateDevices, PrivateNetwork, NoNewPrivileges set.
2015-09-11Merge pull request #1248 from lnykryn/loginctl-show-v2Lennart Poettering
loginctl: print nontrivial properties in logictl show-*
2015-09-11loginctl: print nontrivial properties in logictl show-*Lukas Nykryn
2015-09-11Merge pull request #1245 from evverx/kill-control-on-timeoutLennart Poettering
core: kill processes started due to the ExecReload= on timeout
2015-09-11core: kill processes started due to the ExecReload= on timeoutEvgeny Vereshchagin
2015-09-10Merge pull request #1227 from intelfx/systemctl-legacy-tools-polkitLennart Poettering
systemctl: fix various aspects of polkit authorization in legacy tools.
2015-09-10Merge pull request #1222 from poettering/image-ops-settingsDaniel Mack
machine: when removing, renaming, cloning images also care for .nspaw…
2015-09-10Merge pull request #1239 from poettering/cgroup-pidsDaniel Mack
core: add support for the "pids" cgroup controller
2015-09-10Merge pull request #1242 from poettering/no-off_tDaniel Mack
Drop usage of off_t
2015-09-10core: add support for the "pids" cgroup controllerLennart Poettering
This adds support for the new "pids" cgroup controller of 4.3 kernels. It allows accounting the number of tasks in a cgroup and enforcing limits on it. This adds two new setting TasksAccounting= and TasksMax= to each unit, as well as a gloabl option DefaultTasksAccounting=. This also updated "cgtop" to optionally make use of the new kernel-provided accounting. systemctl has been updated to show the number of tasks for each service if it is available. This patch also adds correct support for undoing memory limits for units using a MemoryLimit=infinity syntax. We do the same for TasksMax= now and hence keep things in sync here.
2015-09-10update TODOLennart Poettering
2015-09-10tree-wide: never use the off_t unless glibc makes us use itLennart Poettering
off_t is a really weird type as it is usually 64bit these days (at least in sane programs), but could theoretically be 32bit. We don't support off_t as 32bit builds though, but still constantly deal with safely converting from off_t to other types and back for no point. Hence, never use the type anymore. Always use uint64_t instead. This has various benefits, including that we can expose these values directly as D-Bus properties, and also that the values parse the same in all cases.
2015-09-10Merge pull request #1236 from evverx/systemctl-requisite-ofLennart Poettering
systemctl: add RequisiteOf* as inverses of Requisite and RequisiteOverridable
2015-09-10Merge pull request #1238 from again4you/devel/fix_smack_mtabLennart Poettering
smack: label /etc/mtab as "_" when '--with-smack-run-label' is enabled.
2015-09-10smack: label /etc/mtab as "_" when '--with-smack-run-label' is enabled.Sangjung Woo
/etc/mtab should be labeled as "_", even though systemd has its own smack label using '--with-smack-run-label' configuration. This is mainly because all processes could read that file and the origin of this file (i.e. /proc/mounts) is labeled as "_". This labels /etc/mtab as "_" when '--with-smack-run-label' is enabled.
2015-09-10systemctl: add RequisiteOf* as inverses of Requisite and RequisiteOverridableEvgeny Vereshchagin
2015-09-10Merge pull request #1226 from poettering/coccinelle-fixes3Daniel Mack
Third round of Coccinelle fixes
2015-09-10systemctl: improve clarity of error messages in the logind pathIvan Shapovalov
2015-09-10systemctl: relax permission checks in halt_main()Ivan Shapovalov
Thus we allow (non-interactive) polkit auth to kick in for legacy commands (halt, poweroff, reboot, telinit) as well. Fixes (another aspect of) issue #213.
2015-09-10systemctl: fix logind bus call error handling in halt_main()Ivan Shapovalov
Handle -EOPNOTSUPP and -EINPROGRESS like in start_special().
2015-09-10systemctl: minor: use IN_SET() instead of repeated equality checks.Ivan Shapovalov
2015-09-10Merge pull request #1234 from medhefgo/masterLennart Poettering
cryptsetup-generator: Properly check return code
2015-09-10cryptsetup-generator: Properly check return codeJan Janssen
2015-09-10Merge pull request #1230 from swem/masterMartin Pitt
Add microphone mute keymap for Dell Precision