1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 06:52:22 +03:00
Commit Graph

17212 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
ba4b35669e man: add sd_event_get_fd(3)
Example from Tom Gundersen is included using xi:include.
The copyright notice stands out a bit. Maybe it should be removed,
and the code placed in public domain.
2014-10-02 20:49:55 -04:00
Thomas Hindoe Paaboel Andersen
94956f8fba firstboot: silence coverity
CID#1237537
2014-10-02 21:37:33 +02:00
Lennart Poettering
2ff8abbd40 Revert "mount: order options before other arguments to mount"
This reverts commit 141a1ceaa6.

People should fix their libc's getopt(), instead of us using a weird
option ordering...
2014-10-02 21:02:03 +02:00
Lennart Poettering
cc19881a69 systemctl: remove spurious newline 2014-10-02 20:38:00 +02:00
Lennart Poettering
2c652b6bfe kdbus: don't clobber return values, use strjoin() instead of asprintf(), keep function invocations and variable declarations separate 2014-10-02 20:38:00 +02:00
Lennart Poettering
8e00bfc234 kdbus: make sure we never invoke free() on an uninitialized pointer on OOM 2014-10-02 20:38:00 +02:00
Lennart Poettering
c7eff5ec06 update TODO 2014-10-02 20:38:00 +02:00
Tom Gundersen
fe4b215625 sd-dhcp6: do basic sanity-checking of supplied DUID 2014-10-02 19:07:30 +02:00
Tom Gundersen
ebe207d4ac sd-dhcp6: specify the type explicitly when setting custom DUID
This would make it simple to verify that the data is on the right format when
the type is known.
2014-10-02 19:07:30 +02:00
Tom Gundersen
9547267dc5 sd-dhcp6: support custom DUID's up to the size specified in the RFC 2014-10-02 19:07:30 +02:00
Dan Williams
66eac1201a sd-dhcp6-client: support custom DUIDs
The caller may have an existing DUID that it wants to use, and may
want to use some other DUID generation scheme than systemd's
default DUID-EN.

[tomegun: whitespace - we never use tabs]
2014-10-02 19:07:30 +02:00
Daniel Mack
995a1063db sd-bus: sync kdbus.h (ABI break!)
struct kdbus_cmd_match got a flags field, which systemd currently makes no
use of.
2014-10-02 17:15:39 +02:00
Michal Sekletar
893e72da6b virt: detect that we are running inside the docker container 2014-10-02 17:15:17 +02:00
Zbigniew Jędrzejewski-Szmek
aa08982d62 Fix order and document user unit dirs
Fixup for 718880ba0d 'add a transient user unit directory'.
2014-10-02 11:11:31 -04:00
Zbigniew Jędrzejewski-Szmek
4d5dec2389 Rename user_runtime to user_runtime_dir
This makes this function name similar to user_config_home() and makes
it match the name of the environment variable.
2014-10-02 11:10:35 -04:00
Steven Allen
718880ba0d add a transient user unit directory
This patch adds a transient user unit directory under
`$XDG_RUNTIME_DIR/systemd/user/` and stores transient user-instance
units (such as those created by `systemd-run --user`) under there
instead of putting them in $XDG_CONFIG_HOME/systemd/user/.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=67331
2014-10-02 10:37:30 -04:00
Jan Synacek
9fd290443f journalctl: add --utc option
Introduce option to display time in UTC.
2014-10-02 14:52:32 +02:00
Lennart Poettering
b344bcbbfd localectl: always print warnings with log_warning() instead of printf()
They really should got to stderr, not stdout.
2014-10-02 14:39:07 +02:00
Lennart Poettering
63229aa1ab localectl: count locale variables from 0, instead of VARIABLE_LANG
That way the we make our code safe regarding reordering of the variables
in the enum.
2014-10-02 14:39:07 +02:00
Daniel Mack
581fe6c817 sd-bus: sync kdbus.h (ABI break)
struct kdbus_cmd_conn_info takes a list of items now instead of a string.

Fix the only user in SD of that ioctl.
2014-10-02 13:04:04 +02:00
Torstein Husebø
4cf07da260 Correct a few typos 2014-10-02 11:46:23 +02:00
David Herrmann
fc80861622 barrier: fix up constructor error handling
We cannot rely on "errno" to be non-zero on failure, if we perform
multiple glibc calls. That is, if the first eventfd() call fails, but the
second succeeds, we cleanup the barrier but return 0.

Fix this by always testing the return value immediately. This should also
fix all the coverity warnings.
2014-10-02 08:40:43 +02:00
David Herrmann
dda57d9143 terminal: add helpers to retrieve page dimensions
Allow term users to retrieve the page dimensions of a terminal screen.
This is needed to properly calculate the grid dimensions when rendering.
2014-10-02 08:40:43 +02:00
David Herrmann
a30f142513 terminal: add term.h header for library users
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.
2014-10-02 08:40:43 +02:00
David Herrmann
056e86ee7f terminal: move unifont-map to datadir
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.
2014-10-02 08:40:43 +02:00
David Herrmann
fa96534573 terminal: add unifont_get_width/height()
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.
2014-10-02 08:40:43 +02:00
David Herrmann
c2977e5cb8 terminal: move unifont-internal.h to unifont.h
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.
2014-10-02 08:40:43 +02:00
Simon McVittie
d20a3daaa7 sd-bus: use terms from the D-Bus Specification a bit more
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.
2014-10-02 08:25:21 +02:00
Simon McVittie
e1ffdb90d9 PORTING-DBUS1: we use :1.%llu not :0.%llu for D-Bus unique bus names 2014-10-02 08:25:21 +02:00
Marcel Holtmann
2e3390ea46 hwdb: Update database of Bluetooth company identifiers 2014-10-02 07:53:15 +02:00
Zbigniew Jędrzejewski-Szmek
3018d31238 core/swap: only make configured units part of swap.target
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
2014-10-02 00:11:36 -04:00
Thomas Hindoe Paaboel Andersen
cf4acf84c6 Remove repeated includes
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.
2014-10-01 23:25:50 +02:00
Thomas Hindoe Paaboel Andersen
56a7dd42d3 gitignore: add test-set 2014-10-01 23:24:10 +02:00
Zbigniew Jędrzejewski-Szmek
647f68249f tests: add tests for {hashmap,set}_steal_first
Just to make sure that coverity is wrong.
2014-10-01 09:34:05 -04:00
Zbigniew Jędrzejewski-Szmek
acb3b3ddc0 shared: util - use nicer idiom to silence Coverity
Change the other spot too.
2014-10-01 09:34:05 -04:00
Zbigniew Jędrzejewski-Szmek
9348f0e690 tmpfiles: use allocated buffer for path
Paths can in principle be longer then PATH_MAX, so
simply allocate the buffer with malloc().

CID #1237773
2014-10-01 08:43:09 -04:00
Zbigniew Jędrzejewski-Szmek
fdb14b7ef4 core: limit timestamp to sane precision
Anything below .1 s is meaningless anyway.
2014-10-01 08:34:05 -04:00
Thomas Hindoe Paaboel Andersen
2b01a801f6 test-fileio: Remove dead check
t cannot be null here
2014-09-30 23:40:40 +02:00
Thomas Hindoe Paaboel Andersen
14c35ce7c1 test-date: don't fail test if log_max_level is higher than LOG_INFO 2014-09-30 23:40:40 +02:00
Thomas Hindoe Paaboel Andersen
59ae3a9573 test-path-util: fix a mem leak and avoid confusing coverity
Found with coverity. Fixes CID#1237754 and #1237790
2014-09-30 22:28:46 +02:00
Thomas Hindoe Paaboel Andersen
791a4fd837 vconsole: silence coverity
Let's silence coverity here too. There is not much to do if the
ioctls to copy the fonts and character maps should fail.
2014-09-30 21:27:54 +02:00
Tom Gundersen
c6828d2794 shared: util - use nicer idiom to silence Coverity
Suggested by Zbigniew.
2014-09-30 11:37:28 +02:00
Tom Gundersen
e63ff941ea core: execute - don't leak strv 2014-09-30 11:34:01 +02:00
Stefan Brüns
24119cf10c udev/hwdb: New Entry for Dell XPS12 9Q33 keyboard
https://bugs.freedesktop.org/show_bug.cgi?id=84437
2014-09-29 22:33:39 -04:00
Tom Gundersen
9fb02b1d5d util: silence coverity
Make it clear in the code that ignoring a failed safe_ato?() is intentional.
2014-09-29 20:52:10 +02:00
Tom Gundersen
e8c8ddccfc nspawn: log when tearing down of loop device fails 2014-09-29 20:52:10 +02:00
Zbigniew Jędrzejewski-Szmek
b1d6dcf5a5 Do not format USEC_INFINITY as NULL
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.
2014-09-29 11:09:39 -04:00
Zbigniew Jędrzejewski-Szmek
ee26bcc038 core/dbus: simplify handling of CPUQuotaPerSecUSec
No functional change intended.
2014-09-29 11:08:12 -04:00
Zbigniew Jędrzejewski-Szmek
4afbccded2 core/swap: advertise Discard over dbus 2014-09-29 11:08:12 -04:00
Zbigniew Jędrzejewski-Szmek
cdc8982030 core/swap: follow the configured unit by default
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.
2014-09-29 11:08:12 -04:00