1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 01:27:11 +03:00
Commit Graph

12865 Commits

Author SHA1 Message Date
Lennart Poettering
aea93debfa bus: bump serial number counter when sending already sealed messages 2013-11-20 19:36:14 +01:00
Lennart Poettering
80c1974018 bus: sd_bus_error_setxyz calls should always return the error as errno style negative int 2013-11-20 19:36:14 +01:00
Lennart Poettering
725d7e6ceb libudev: always return NULL in _unref() APIs
Returning anything else but NULL would suggest the caller's reference
might still be valid, but it isn't, because the caller just invoked
_unref() after all.

This turns the return value into a typesafe shortcut that allows
unreffing and resetting a reference in one line. In contrast to
solutions for this which take a pointer to a pointer to accomplish the
same this solution is just syntactic sugar the developer can make use of
but doesn't have to, and this is particularly useful when immediately
unreffing objects returned by function calls.
2013-11-20 19:36:14 +01:00
Lennart Poettering
994e023433 libudev: always return valid negative error codes on API functions 2013-11-20 19:36:14 +01:00
Lennart Poettering
135168183e calendar: support 'yearly' and 'annually' names the same way as cron 2013-11-20 19:36:14 +01:00
Lennart Poettering
8e64fd110d hwclock: modernizations 2013-11-20 19:36:14 +01:00
Lennart Poettering
d3cfcae9db macro: add _unlikely_() to assert_return()
As the name indicates assert_return() is really just for assertions,
i.e. where it's a programming error if the assertion does not hold.
Hence it is safe to add _unlikely_() decorators for the expression to
check.
2013-11-20 19:36:14 +01:00
Lennart Poettering
780dbeef9f macro: change assert_cc() so that it can appear outside of functions 2013-11-20 19:36:14 +01:00
Lennart Poettering
fd1b903adb include: make direct includion of _sd-common.h harder 2013-11-20 19:36:14 +01:00
Lennart Poettering
16ed0233a5 install: use const where we can 2013-11-20 19:36:13 +01:00
Tom Gundersen
91ffff9621 conf-parser: don't leak section names
If we encounter an unknown section, we must free the previous section before
clearing the pointer.
2013-11-20 17:54:09 +01:00
David Herrmann
0cc1125ae1 event: clear pending-state when re-arming timers
If a timer fires and is marked pending, but an application re-arms it
before it is dispatched, we now clear the pending state.

This fixes a bug where an application arms a timer, which fires and is
marked pending. But before it is dispatched, the application loses
interest in it and disables it. Now if the timer is re-armed and
re-enabled later, it will be immediately dispatched as it is still marked
pending.

This behavior is unexpected, so avoid it by clearing pending state when
re-arming timers. Note that applications have no way to clear pending
state themselves, so there's no current workaround.
2013-11-20 16:19:58 +01:00
David Herrmann
6c1508b871 bus: fix error-path in bus_map_all_properties()
We shouldn't return positive integers on errors. Fix the typo by removing
the negation.
2013-11-20 16:19:58 +01:00
Thomas Hindoe Paaboel Andersen
d7726e578a bus/rtnl: silence clang warnings 2013-11-20 12:42:43 +01:00
Tom Gundersen
0617ffabe8 networkd: make sure Links and Networks are freed 2013-11-19 14:39:19 +01:00
Jose Ignacio Naranjo
bc9cdba5dd keymap: Add Toshiba Satellite U940
Signed-off-by: Martin Pitt <martinpitt@gnome.org>
2013-11-19 08:15:50 +01:00
Zbigniew Jędrzejewski-Szmek
0732ef7acf localed: match converted keymaps before legacy
Before, X11 keymap fr-pc105-oss would be converted to fr,
even though fr-oss exists. Now, if
/usr/lib/kbd/keymaps/xkb/<layout>[-<variant>].map[.gz] exists,
<layout>[-<variant>] will be used as the console keymap,
falling back to the legacy mappings otherwise.

% sudo localectl set-x11-keymap pl pc105
% localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: pl                      (was pl2 before)
      X11 Layout: pl
       X11 Model: pc105
% sudo localectl set-x11-keymap fr pc105 oss
% localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: fr-oss                  (was fr before)
      X11 Layout: fr
       X11 Model: pc105
     X11 Variant: oss
% sudo localectl set-x11-keymap fr pc105
% localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: fr
      X11 Layout: fr
       X11 Model: pc105
% sudo localectl set-x11-keymap gb
% localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: gb                     (was uk before)
      X11 Layout: gb
2013-11-18 20:35:52 -05:00
Zbigniew Jędrzejewski-Szmek
98fce79dea localed: use _cleanup_ 2013-11-18 20:35:52 -05:00
Karel Zak
4561be3a64 Remove duplicate includes 2013-11-18 20:28:55 -05:00
Shawn Landden
05d3a17623 use #pragma once instead of foo*foo define guards 2013-11-18 20:28:54 -05:00
Thomas Hindoe Paaboel Andersen
d5d217eae1 remove unused variables 2013-11-18 23:04:16 +01:00
Kay Sievers
f21326e604 bus: TIMESTAMP is optional kdbus metadata now, NAMES are always added 2013-11-18 01:30:57 +01:00
Shawn Landden
f0511bd7e3 core/socket: fix SO_REUSEPORT 2013-11-17 17:41:35 -05:00
Shawn Landden
e55001ebba core/socket: use _cleanup_free_ 2013-11-17 17:41:35 -05:00
Tom Gundersen
f882c247ad networkd: make all calls async 2013-11-17 23:12:27 +01:00
Tom Gundersen
8cd11a0f0f networkd: store netmask and mac address explicitly 2013-11-17 23:11:11 +01:00
Kay Sievers
16be43684f bus: CREDS and NAMES are optional kdbus metadata now 2013-11-17 22:35:58 +01:00
Sylvain Plantefeve
0571a6b0a9 catalog: add French translation 2013-11-17 11:56:19 -05:00
Zbigniew Jędrzejewski-Szmek
87267de89d tmpfiles: adjust excludes for the new per-service private dirs
In d8c9d3a (systemd: use unit name in PrivateTmp directories)
I forgot to update the tmpfiles config.
2013-11-16 17:30:58 -05:00
Olivier Brunel
9cd861842c Fix RemainAfterExit services keeping a hold on console
When a service exits succesfully and has RemainAfterExit set, its hold
on the console (in m->n_on_console) wasn't released since the unit state
didn't change.
2013-11-16 12:08:11 -05:00
Sylvain Plantefeve
ad929fe196 po: add French translation 2013-11-16 11:56:14 -05:00
Zbigniew Jędrzejewski-Szmek
7524c3cf44 bash-completion: journalctl --file 2013-11-15 22:54:51 -05:00
Zbigniew Jędrzejewski-Szmek
952d97ed2b random-seed: improve debugging messages a bit 2013-11-15 22:53:14 -05:00
Zbigniew Jędrzejewski-Szmek
4e8da52959 fstab-generator: use RequiresOverridable for fsck units
This allows the user to disable fsck's by masking.

If fsck fails, emergency target is started, the user might mount the
unit using mount and disable fsck by masking the unit. In this case,
.mount will be active because the mount is detect through
/proc/self/mountinfo, but systemd-fsck@.service will still be in
failed mode. This results in a funny situation where

$ systemctl show -p ActiveState local-fs.target yyy.mount
ActiveState=active
ActiveState=active

$ sudo systemctl start local-fs.target
[sudo] password for test:
Failed to start local-fs.target: Unit systemd-fsck@xxx.service is masked.
2013-11-15 22:53:14 -05:00
Zbigniew Jędrzejewski-Szmek
e48614c4b2 core: some more _cleanup_free_ 2013-11-15 22:53:14 -05:00
Zbigniew Jędrzejewski-Szmek
94192cdaf6 fsck,fstab-generator: be lenient about missing fsck.<type>
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-15 22:53:14 -05:00
Zbigniew Jędrzejewski-Szmek
e375825da0 fsck: modernization 2013-11-15 22:53:14 -05:00
Dave Reisner
7d74558bb6 ycm_extra_conf: include src/systemd for headers 2013-11-15 22:44:15 -05:00
Dave Reisner
4e1b76c214 build: use printf to generate symbol tests
echo is basically unportable, so use printf instead.
2013-11-15 22:44:02 -05:00
Tom Gundersen
b5643a8b1b build-sys: don't mix dynamic and static libs 2013-11-15 14:00:24 +01:00
Tom Gundersen
b4f2a5b197 rtnl: add event loop integration 2013-11-14 23:22:58 +01:00
Tom Gundersen
0927756b8d bus: typo
Fix a couple of 'void' that should have been 'sd_bus'.
2013-11-14 22:19:48 +01:00
Tom Gundersen
81eca919f7 loopback-setup: move to rtnl
This should be equivalent to the old behavior.
2013-11-14 15:11:15 +01:00
Tom Gundersen
e16bcf986e rtnl: add call_async and call_async_cancel
They work in the same way as the sd-bus equivalents.
2013-11-14 14:32:48 +01:00
Zbigniew Jędrzejewski-Szmek
24710f6d2f Update TODO 2013-11-14 00:08:36 -05:00
Olivier Brunel
5b1869eaa2 Fix possible lack of status messages on shutdown/reboot
Since 31a7eb86 the output on console can be disabled to avoid colliding with
gettys. However, it could also lead to a lack of messages during
shutdown/reboot.
2013-11-13 23:22:31 -05:00
Olivier Brunel
2f38577f30 Only disable output on console during boot if needed
If there are no more jobs on console, no need/we shouldn't disable output.
2013-11-13 23:22:31 -05:00
Olivier Brunel
8aa5429a4a Resolve /dev/console to the active tty instead of just "tty0"
When resolving /dev/console one would often get "tty0" meaning the active VT.
Resolving to the actual tty (e.g. "tty1") will notably help on boot when
determining whether or not PID1 can output to the console.
2013-11-13 23:22:30 -05:00
Marko Myllynen
51d0f1c9f6 zsh-completion: add bootctl 2013-11-13 23:02:23 -05:00
Marko Myllynen
1bc64d7735 man: add bootctl(8)
https://bugzilla.redhat.com/show_bug.cgi?id=1014303
2013-11-13 22:56:22 -05:00