Commit Graph

3270 Commits

Author SHA1 Message Date
Lennart Poettering
129eebe020 logind: simplify session_activate() a bit 2012-01-18 13:56:02 +01:00
Lennart Poettering
abc5bbc6f0 logind: allow to create multiple sessions on non-multi-session seats to deal with left-over sessions 2012-01-18 13:56:02 +01:00
Lennart Poettering
87a8baa35d update TODO 2012-01-18 13:56:02 +01:00
Michal Schmidt
281605bf14 util: fix ANSI sequence for red color
Red turned green by mistake in commit c1072ea0.
2012-01-17 12:54:45 +01:00
Michal Schmidt
b7f336383d log: make asserts cheaper
On my x86_64 this shrinks the size of .text by 53 KB (7 %).
2012-01-17 12:34:53 +01:00
Michal Schmidt
2b7dec8661 log: remove useless variable
abort() never returns. Not even if the signal handler catches SIGABRT.
2012-01-17 12:34:53 +01:00
Michal Schmidt
e2110e5d1b dbus-unit: make functions static
The dbus_unit_append_*() functions are not referenced from outside anymore.
2012-01-17 12:34:53 +01:00
Kay Sievers
6185ac1e52 build-sys: cleanup sysctl.d/coredump.conf 2012-01-16 13:49:08 +01:00
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
595ed347a8 unit: use safe downcasts, remove pointless casts
Always use the macros for downcasting.
Remove a few obviously pointless casts.
2012-01-16 13:34:42 +01:00
Michal Schmidt
1124fe6f01 unit: use the UNIT() macro consistently
The UNIT() macro upcasts from specific unit types to the base Unit.
Use it everywhere, rather than accessing the 'meta' member directly.
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
Michal Schmidt
7d17cfbc46 unit: reduce heap usage for unit objects
The storage of the unit objects on the heap is currently not very
efficient. For every unit object we allocate a chunk of memory as large
as the biggest unit type, although there are significant differences in
the units' real requirements.
pahole shows the following sizes of structs:
488  Target
496  Snapshot
512  Device
528  Path
560  Timer
576  Automount
1080 Socket
1160 Swap
1168 Service
1280 Mount

Usually there aren't many targets or snapshots in the system, but Device
is one of the most common unit types and for every one we waste
1280 - 512 = 768 bytes.

Fix it by allocating only the right amount for the given unit type.
On my machine (x86_64, with 39 LVM volumes) this decreases systemd's
USS (unique set size) by more than 300 KB.
2012-01-16 13:34:42 +01:00
Michal Schmidt
1637a8be55 logind: downgrade login message to debug
The messages make people nervous.

https://bugzilla.redhat.com/show_bug.cgi?id=727315
2012-01-16 13:18:17 +01:00
Lennart Poettering
fee80f6956 journal: drop privileges when storing coredump 2012-01-14 03:37:32 +01:00
Lennart Poettering
e6acda19b2 journal: when show blob data show length 2012-01-14 03:07:47 +01:00
Lennart Poettering
32895bb390 util: support formatting eta and peta bytes with format_bytes() 2012-01-14 03:07:29 +01:00
Lennart Poettering
a7bc2c2ac8 util: introduce FORMAT_BYTES_MAX 2012-01-14 03:06:57 +01:00
Lennart Poettering
de0229ca36 journal: collect coredump up to 24M in size 2012-01-14 03:05:34 +01:00
Lennart Poettering
4c7de07481 journal: handle empty syslog identifier properly 2012-01-14 01:54:33 +01:00
Lennart Poettering
5c3759bf8a journal: fix bad memory access 2012-01-14 01:54:33 +01:00
Lennart Poettering
0dad12c190 journal: if the data to be sent is larger than the maximum datagram size resort to passing a temporary fd over native protocol 2012-01-14 01:54:33 +01:00
Lennart Poettering
f5e04665eb journal: hook up coredumping with journal 2012-01-14 01:54:33 +01:00
Lennart Poettering
755a02c680 journal: add new system-cat tool as kind of a more powerfull BSD logger 2012-01-14 01:54:33 +01:00
Lennart Poettering
3043935f02 util: split out tty_is_vc_resolve() from default_term_for_tty() 2012-01-14 01:54:33 +01:00
Lennart Poettering
c1072ea0da util: rework ANSI escape code macros 2012-01-14 01:54:33 +01:00
Michal Schmidt
9ddc4a26e5 mount: fix quota
quotacheck.service and quotaon.service were not pulled in for fstab mounts.
Fix it by not clearing the default_dependencies flag.

The root filesystem may have quotas too, so don't check for "/" there.

No need to have duplicate code for adding dependencies on umount.target.

https://bugzilla.redhat.com/show_bug.cgi?id=773431
2012-01-14 00:12:10 +01:00
Lennart Poettering
6ef25fb65e pam: fix build 2012-01-13 20:52:45 +01:00
Lennart Poettering
fc7985ed67 pam: work correctly if a seat is specified but not vtnr 2012-01-13 20:51:58 +01:00
Lennart Poettering
d3f2bdbfee journal: add output mode that just prints simple messages without any decorations 2012-01-13 02:58:45 +01:00
Lennart Poettering
f987397649 api: add C++ guards to all headers 2012-01-13 00:49:21 +01:00
Lennart Poettering
ebda471d89 sd-login: teach sd_pid_get_unit() proper handling of instantiated services 2012-01-13 00:49:02 +01:00
Lennart Poettering
7c8bbccd07 journal: if the syslog forwarder socket is full, then don't block 2012-01-12 05:09:24 +01:00
Lennart Poettering
4cfa2c999d core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
Lennart Poettering
ead51eb4ed units: make sure syslog socket goes away early during shutdown 2012-01-12 04:34:50 +01:00
Lennart Poettering
5ba081b0fb log: make internal log api log directly to the journal 2012-01-12 04:34:31 +01:00
Lennart Poettering
8a0f04e6a2 journal: add SELinux context to all logged messages 2012-01-11 22:45:05 +01:00
Lennart Poettering
b785c858c3 journal: fix more 32/64 bit issues 2012-01-11 22:44:43 +01:00
Lennart Poettering
fdcad0c255 tmpfiles: fix parsing of /proc/net/unix on 32Bit machines
Tracked down by Michael Meeks
2012-01-11 22:08:33 +01:00
Michal Schmidt
52beb2c379 logs-show: fix missing newline in short output
Ellipsized messages were printed without a newline.
2012-01-11 21:53:00 +01:00
Lennart Poettering
7f120cc6a2 journald: don't assume size_t and uint64_t are the same 2012-01-11 21:24:02 +01:00
Lennart Poettering
5e41cfec83 journald: set group ownership of journal files to 'adm' by default 2012-01-11 21:11:58 +01:00
Lennart Poettering
e6520a0fce journal: make requirement for ACLs optional 2012-01-11 20:40:29 +01:00
Lennart Poettering
d1e44dd827 journalctl: fix --help text 2012-01-11 16:03:42 +01:00
Lennart Poettering
dcbd5d16e9 build-sys: fix upload rule for xz 2012-01-11 04:01:50 +01:00
Lennart Poettering
f1a42db5a3 build-sys: bump version 2012-01-11 03:56:35 +01:00
Lennart Poettering
1921a5cb3d journal: don't realign window twice 2012-01-11 03:55:24 +01:00
Lennart Poettering
19a2bd80c1 sd-journal: implement a number of non-implemented calls from the API for now 2012-01-11 03:23:04 +01:00
Lennart Poettering
731a676c20 systemd: reconnect to syslog as soon as the journal is fully up 2012-01-11 03:16:24 +01:00
Lennart Poettering
3ebcdf8cd9 journalctl: always show monotonic timestamp even if it's from an old boot 2012-01-11 03:02:10 +01:00