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

73 Commits

Author SHA1 Message Date
Michal Schmidt
d200735e13 dbus: more efficient implementation of properties
The way the various properties[] arrays are initialized is inefficient:
 - only the .data members change at runtime, yet the whole arrays of
   properties with all the fields are constructed on the stack one by
   one by the code.
 - there's duplication, eg. the properties of "org.freedesktop.systemd1.Unit"
   are repeated in several unit types.

Fix it by moving the information about properties into static const
sections. Instead of storing the .data directly in the property, store
a constant offset from a run-time base.
The small arrays of struct BusBoundProperties bind together the constant
information with the right runtime information (the base pointer).

On my system the code shrinks by 60 KB, data increases by 10 KB.
2012-01-16 13:34:42 +01:00
Michal Schmidt
ac155bb885 unit: remove union Unit
Now that objects of all unit types are allocated the exact amount of
memory they need, the Unit union has lost its purpose. Remove it.

"Unit" is a more natural name for the base unit class than "Meta", so
rename Meta to Unit.

Access to members of the base class gets simplified.
2012-01-16 13:34:42 +01:00
Lennart Poettering
f8440af5fe coverity: change a few things so that coverity doesn't show so many false positives 2011-09-23 01:45:34 +02:00
Tero Roponen
07cc1c066d dbus: 'directrion' is not a valid attribute
$ gdbus introspect --system --dest org.freedesktop.systemd1 --object-path /org/freedesktop/systemd1
Error parsing introspection XML: 115:64: attribute 'directrion' invalid for element 'arg'
2011-08-24 13:54:41 +02:00
Kay Sievers
e191553d1d convert int to boolean for dbus_bool_t 2011-08-17 19:38:07 +02:00
Lennart Poettering
835680f53e dbus: fix MaskUnitFiles bus call 2011-08-02 00:10:40 +02:00
Lennart Poettering
d605b2fd41 dbus: the changes array might actually be NULL when ti is empty 2011-07-28 15:49:18 +02:00
Lennart Poettering
729e3769c3 systemctl: hook up new install logic
This adds a number of new options to systemctl, for presets, reenabling,
masking/unmask, and runtime operations.
2011-07-25 04:58:02 +02:00
Lennart Poettering
c0576cd6d6 bus: expose installer functions 2011-07-23 03:44:47 +02:00
Lennart Poettering
0a524ba7c3 unit: accept empty defaults for kill who/mode args 2011-07-13 19:59:28 +02:00
Lennart Poettering
18fa6b2705 dbus: send our finished signal when we are finished booting 2011-06-27 13:47:03 +02:00
Lennart Poettering
8d0e38a2b9 dbus: introduce UnsetAndSetEnvironment() 2011-06-21 19:29:45 +02:00
Lennart Poettering
b23de6af89 dbus: make daemon reexecution synchronous
We simply keep open copies of the dbus connections across the
reexecution and close them as last step of it. A client can thus simply
wait until its connection is dropped to know when the reexecution is
finished.

https://bugzilla.redhat.com/show_bug.cgi?id=698198
2011-04-28 22:07:01 +02:00
Lennart Poettering
a133bf10d0 dbus: don't hit assert when dumping properties
https://bugs.freedesktop.org/show_bug.cgi?id=36472
2011-04-27 00:28:10 +02:00
Lennart Poettering
bfebab7f69 dbus: split out object management code into dbus-common, and simplify it 2011-04-16 02:03:35 +02:00
Lennart Poettering
b21a0ef8fc dbus: expose monotonic timestamps on the bus 2011-04-07 21:35:37 +02:00
Lennart Poettering
20c03b7be2 don't make up buffer sizes, use standard LINE_MAX instead 2011-04-07 18:48:50 +02:00
Lennart Poettering
da19d5c19f src: our lord is coverity 2011-03-31 15:35:40 +02:00
Lennart Poettering
871c44a747 taint: add missing cgroups taint flag 2011-03-30 02:12:46 +02:00
Lennart Poettering
72bc8d0056 manager: fix taint check for /usr 2011-03-30 00:47:50 +02:00
Kay Sievers
65c9e46752 tainted: don't check if /usr is a mount point, only if it's not already mounted at startup 2011-03-24 22:32:21 +01:00
Lennart Poettering
05feefe0fb dbus: properly generate UnknownInterface, UnknownProperty and PropertyReadOnly errors 2011-03-09 20:01:53 +01:00
Andrey Borzenkov
c826cda421 add org.freedesktop.DBus.Properies.Set method
The patch adds framework for processing Set requests on properties
and as first consumers allows setting of LogTarget and LogLevel on
interface org.freedesktop.systemd1.Manager of org.freedesktop.systemd1.

The code should be generic enough to allow processing of any
property on other objects and interfaces as well.

No systemctl visible interface is added so far. The LogTarget and
LogLevel are meant for debugging in the first place; user interface
can be added if other usage emerge.

Set on systemwide systemd is restricted to root; I am not sure
how session level access is controlled.
2011-03-07 02:17:31 +01:00
Lennart Poettering
c5d3439055 dbus: add 'Tainted' property to Manager object 2011-03-04 19:47:43 +01:00
Lennart Poettering
09bde77fc7 dbus: expose distribution name and features on manager object as properties 2011-03-04 18:34:56 +01:00
Lennart Poettering
5d44db4a90 dbus: pass along information why a job failed when it failed (dbus api change!) 2011-02-24 02:36:34 +01:00
Lennart Poettering
0a494f1ff3 exec: introduce global defaults for the standard output of services 2011-02-15 11:52:29 +01:00
Thierry Reding
9a60da2834 build-sys: allow cross-compilation
When cross-compiling systemd, the introspection XML files fail to be
generated because the systemd host binary is not executable. This patch
works around this by putting the introspection XML data into separate
ELF sections and extracting them from the binary when generating the XML
files.

The extracted XML data is passed through the strings utility in order to
strip the trailing NUL character. A small AWK script is used to prepend
the doctype and add the opening and closing node tags respectively.
Finally, the C preprocessor is used to substitute the correct doctype
information from the D-Bus header files.
2010-11-23 22:38:55 +01:00
Lennart Poettering
06d4c99ab3 manager: make list of default controllers configurable 2010-11-18 00:42:35 +01:00
Lennart Poettering
af2d49f70b drop support for MANAGER_SESSION, introduce MANAGER_USER instead 2010-11-15 22:13:26 +01:00
Lennart Poettering
e9ddabc246 manager: parse RD_TIMESTAMP passed from initrd 2010-11-10 22:38:44 +01:00
Lennart Poettering
8a0867d6c5 systemctl: introduce systemctl kill 2010-10-22 16:11:50 +02:00
Lennart Poettering
90bb85e140 fsck: atomically replace base.target by rescue.target/reboot.target when fsck fails 2010-10-19 21:53:19 +02:00
Lennart Poettering
6652a2b9e5 dbus: expose shutdown helper via D-Bus 2010-10-14 00:53:51 +02:00
Fabiano Fidencio
07459bb6b9 sysv: optionally disable of SysV init/rcN.d support at compile time
This patch adds a cpp definition HAVE_SYSV_COMPAT that is used to
isolate code dealing with /etc/init.d and /etc/rcN.d for systems where
it does not make sense (one that does not use sysv or one that is fully
systemd native).

The patch tries to be as little intrusive as possible, however in
order to minimize the number of #ifdef'ed regions I've reordered some
code in path-lookup.c:lookup_paths_init() where all code dealing with
sysv is now isolated under running_as == MANAGER_SYSTEM as well.

Moreover, In struct Service, some fields were rearranged to reduce
the number of ifdefs.

Lennart's suggestions were fixed and squashed with the original patch,
that was sent by Gustavo Sverzut Barbieri (barbieri@profusion.mobi).
2010-09-27 03:25:05 +02:00
Lennart Poettering
76bf48b7d0 dbus: export number of total failed jobs on D-Bus interface 2010-09-23 15:38:42 +02:00
Gustavo Sverzut Barbieri
fa70128df1 dbus: add Progress property to introspection 2010-09-21 16:55:35 +02:00
Lennart Poettering
05d6a3b6cf manager: calculate progress value while booting 2010-09-21 04:25:48 +02:00
Lennart Poettering
b0c918b97f manager: measure startup times 2010-09-21 04:14:38 +02:00
Lennart Poettering
e409f87570 manager: count how many jobs we executed 2010-09-21 03:51:31 +02:00
Matthew Miller
fdf20a3160 manager: add missing second part of s/maintenance/failed/ 2010-08-31 00:23:34 +02:00
Lennart Poettering
173a8d04fc mount: rework automatic mounting to follow the 'nofail' option in fstab 2010-08-25 20:37:04 +02:00
Lennart Poettering
d3689161a2 mount: add global configuration options for handling of auto mounts 2010-08-25 03:11:26 +02:00
Lennart Poettering
c4e2ceae94 dbus: follow standardized fdo PropertiesChanged signal spec 2010-08-20 02:31:54 +02:00
Matthias Clasen
5948ee7cef dbus: small typo in introspection data
Hey,

here is a patch to fix a small typo in the systemd dbus introspection data.
I found this while trying to explore the systemd dbus API via bash
completion with gdbus. You should try this, it is really fun, and,
evidently, helps to find some bugs...

Matthias
2010-08-18 23:10:43 +02:00
Lennart Poettering
d6c9574fb5 emacs: make sure nobody accidently adds tabs to our sources 2010-08-14 19:59:25 +02:00
Lennart Poettering
34e9ba669e service: rename Type=finish to Type=oneshot and allow multiple ExecStart= lines for oneshot services
In contrast to the other service types oneshot services are usually not
long lasting and there's not necessarily a single clean main process for
them. This change allows multiple ExecStart= lines for this type of
services so that the admin/developer doesn't have to arbitrarily pick on
of various sequential commands as the "main one".
2010-08-13 18:23:01 +02:00
Lennart Poettering
598b557bf0 systemctl: when calling 'status' accept a PID 2010-08-13 02:07:22 +02:00
Lennart Poettering
b5e9dba8d6 unit: rename OnlyByDependency= to RefuseManualStart= and introduce RefuseManualStop=
Some unit shall never be start on user request (e.g. shutdown.target)
others never be stopped on user request (e.g. auditd.servce), hence
offer options for both.
2010-08-11 01:44:37 +02:00
Lennart Poettering
6e98720f14 service: hide output of sysv scripts if quiet is passed on the kernel cmdline 2010-08-09 18:00:24 +02:00