summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-18rename CMP_F_TYPE to F_TYPE_CMPHarald Hoyer
2013-04-18Add ugly CMP_F_TYPE() macroHarald Hoyer
On some architectures (like s390x) the kernel has the type int for f_type, but long in userspace. Assigning the 32 bit magic constants from linux/magic.h to the 31 bit signed f_type in the kernel, causes f_type to be negative for some constants. glibc extends the int to long for those architecures in 64 bit mode, so the negative int becomes a negative long, which cannot be simply compared to the original magic constant, because the compiler would automatically cast the constant to long. To workaround this issue, we also compare to the (int)MAGIC value in a macro. Of course, we could do #ifdef with the architecure, but it has to be maintained, and the magic constants are 32 bit anyway. Someday, when the int is unsigned or long for all architectures, we can remove this macro again. Until then, keep it as simple as it can be.
2013-04-18core/execute: only clean the environment, if we have oneHarald Hoyer
2013-04-18build-sys: add sd_journal_add_conjunction() to symbol versioning fileLennart Poettering
2013-04-18man: document the new sd_journal_add_conjunction() callLennart Poettering
2013-04-18update TODOLennart Poettering
2013-04-18Move bus_error to dbus-common and remove bus_error_message_or_strerrorSimon Peeters
bus_error and bus_error_message_or_strerror dit almost exactly the same, so use only one of them and place it in dbus-common.
2013-04-18cryptsetup-generator: add support for rd.luks.key=Harald Hoyer
Also clarify rd.luks.uuid and luks.uuid in the manual. https://bugzilla.redhat.com/show_bug.cgi?id=905683
2013-04-18man: document that timeout=0 is the default for entries in crypttabLennart Poettering
2013-04-18cryptsetup: set the timeout to 0 by defaultHarald Hoyer
cryptsetup itself has no timeout as default from the beginning. So the default timeout has been "0" from the beginning. https://bugzilla.redhat.com/show_bug.cgi?id=949702
2013-04-18execute: always add in EXECUTABLE= field when we log something about executionLennart Poettering
2013-04-18systemctl: drop usage of "internally loaded modules"Lennart Poettering
I wouldn't know what "internally" is supposed to mean hear, and we use this terminology in this context nowhere else, so let's drop this.
2013-04-17readahead: let readahead run for a little longerLennart Poettering
Especially slower systems need more than 10s for starting the session, so let's bump this to 30s.
2013-04-17update TODOLennart Poettering
2013-04-17fixup for cddf148028f52Harald Hoyer
Instead of making a type up, just use __SWORD_TYPE, after reading statfs(2). Too bad, this does not fix s390x because __SWORD_TYPE is (long int) and the kernel uses (int) to fill in the field!!!!!!
2013-04-17bootchart: Fix errno usage.Auke Kok
2013-04-17update TODOLennart Poettering
2013-04-17bus: replace aligned_alloc() with memalign() everywhereLennart Poettering
aligned_alloc() is C11 and not available everywhere. Also it would require us to align the size value. So let's just invoke memalign() instead, which is universally available and doesn't have any alignment restrictions on the size parameter.
2013-04-17core: Remove unnecessary typedefHenrik Grindal Bakken
ExecContext isn't used in this header file, and everything seems to build just fine without this typedef. The typedef doesn't really belong here, and at least my gcc-4.4.6 gives an error on type redefined.
2013-04-17fixup 8c68a7017 and cast to (unsigned long)Harald Hoyer
2013-04-17fixed statfs.f_type signed vs unsigned comparisonsHarald Hoyer
statfs.f_type is signed but the filesystem magics are unsigned. Casting the magics to signed will not make the signed. Problem seen on big-endian 64bit s390x with __fsword_t 8 bytes. Casting statfs.f_type to unsigned on the other hand will get us what we need. https://bugzilla.redhat.com/show_bug.cgi?id=953217
2013-04-17shell-completion: use -a to see "empty" propertiesZbigniew Jędrzejewski-Szmek
2013-04-17update TODOLennart Poettering
2013-04-17TODO: add s.th. like "systemctl set-log-level debug"Harald Hoyer
2013-04-17core/execute: report invalid environment variables from filesHarald Hoyer
Because "export key=val" is not supported by systemd, an error is logged where the invalid assignment is coming from. Introduce strv_env_clean_log() to log invalid environment assignments, where logging is possible and allowed. parse_env_file_internal() is modified to allow WHITESPACE in keys, to report the issues later on.
2013-04-17Revert "man/systemd.xml: change the signal names to kill systemd"Harald Hoyer
This reverts commit 432c30d25fc2a7b4939d5ea6c29708e1323a2b9c. Suggestion was to fix bash instead. :-/
2013-04-17systemctl:enable_sysv_units() more _cleanup_free_Harald Hoyer
2013-04-17fileio:parse_env_file_internal() fix environment file parsingHarald Hoyer
parse_env_file_internal() could not parse the following lines correctly: export key="val" key="val"#comment
2013-04-17core/execute.c: debug log final execve() with argv[]Harald Hoyer
https://bugzilla.redhat.com/show_bug.cgi?id=772073
2013-04-17man/systemd.xml: change the signal names to kill systemdHarald Hoyer
Using the signal name to put systemd in debug mode with bash results in: $ kill -s SIGRTMIN+22 1 bash: kill: SIGRTMIN+22: invalid signal specification whereas this works: $ kill -s SIGRTMAX-8 1 /usr/bin/kill understands both signal names, so just change them to the bash names.
2013-04-17systemctl: clarify usage of "--all" versus list-unit-filesHarald Hoyer
Novice users might think, that $ systemctl --all is equal to $ systemctl list-unit-files https://bugzilla.redhat.com/show_bug.cgi?id=748512
2013-04-17journalctl: specify "--unit=" and "--user-unit" multiple timesHarald Hoyer
Previously only one "--unit=" or "--user-unit" could be specified. With this patch, journalcrtl can show multiple units. $ journalctl -u systemd-udevd.service -u sshd.service -u crond.service -b -- Logs begin at Sa 2013-03-23 11:08:45 CET, end at Fr 2013-04-12 09:10:22 CEST. -- Apr 12 08:41:37 lenovo systemd[1]: Started udev Kernel Device Manager. Apr 12 08:41:37 lenovo systemd[1]: Stopped udev Kernel Device Manager. Apr 12 08:41:38 lenovo systemd[1]: Started udev Kernel Device Manager. Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (Syslog will be used instead of sendmail.) Apr 12 08:41:38 lenovo crond[291]: (CRON) INFO (running with inotify support) Apr 12 08:41:39 lenovo systemd[1]: Starting OpenSSH server daemon... Apr 12 08:41:39 lenovo systemd[1]: Started OpenSSH server daemon. Apr 12 08:41:39 lenovo sshd[355]: Server listening on 0.0.0.0 port 22. Apr 12 08:41:39 lenovo sshd[355]: Server listening on :: port 22. Apr 12 08:41:39 lenovo mtp-probe[373]: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.6/1-1.5.6.2/1-1.5.6.2.1"
2013-04-17journal: add one more level on top with ANDHarald Hoyer
When using "-p" and "-b" in combination with "-u", the output is not what you would expect. The reason is the sd_journal_add_disjunction() call in add_matches_for_unit() and add_matches_for_user_unit(), which adds two ORs without taking the other conditions to every OR. Adding another level on top with AND and sd_journal_add_conjunction() solves the problem. Output before: $ journalctl -o short-monotonic -ab -p 0 -u sshd.service -- Reboot -- [ 3.216305] lenovo systemd[1]: Starting OpenSSH server daemon... -- Reboot -- [ 3.168666] lenovo systemd[1]: Starting OpenSSH server daemon... [ 3.169639] lenovo systemd[1]: Started OpenSSH server daemon. [36285.635389] lenovo systemd[1]: Stopped OpenSSH server daemon. -- Reboot -- [ 10.838657] lenovo systemd[1]: Starting OpenSSH server daemon... [ 10.913698] lenovo systemd[1]: Started OpenSSH server daemon. [ 6881.035183] lenovo systemd[1]: Stopped OpenSSH server daemon. -- Reboot -- [ 6.636228] lenovo systemd[1]: Starting OpenSSH server daemon... [ 6.662573] lenovo systemd[1]: Started OpenSSH server daemon. [ 6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22. [ 6.681379] lenovo sshd[397]: Server listening on :: port 22. As we see, the output is from _every_ boot and priority 0 is not taken into account. Output after patch: $ journalctl -o short-monotonic -ab -p 0 -u sshd.service -- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:58:21 CET. -- Increasing the priority: $ journalctl -o short-monotonic -ab -p 6 -u sshd.service -- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:59:12 CET. -- [ 6.636228] lenovo systemd[1]: Starting OpenSSH server daemon... [ 6.662573] lenovo systemd[1]: Started OpenSSH server daemon. [ 6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22. [ 6.681379] lenovo sshd[397]: Server listening on :: port 22.
2013-04-17core/device.c: fix possible segfaultHarald Hoyer
https://bugs.freedesktop.org/show_bug.cgi?id=63189 better fail than segfault systemd[1]: Failed to load device unit: Invalid argument systemd[1]: Failed to process udev device event: Invalid argument
2013-04-17TODO: remove fixed systemctl property bugHarald Hoyer
2013-04-17timedated: fixed NTP enabled: n/aHarald Hoyer
2013-04-17configure: use AC_CHECK_TOOL for objcopy, strings and gperfMartin Jansa
* using AC_PATH_TOOL does not allow to override it from shell environment which is useful when cross-compiling * with external toolchain I have different HOST_PREFIX and HOST_SYS AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy which is available only as ${TARGET_PREFIX}-objcopy then it tries objcopy without prefix which is found on host, but that objcopy does not work for !host (e.g. arm when building on x86) libs
2013-04-17fileio: also escape $ and ` when writing out env varsMantas Mikulėnas
These are also considered special by sh and bash.
2013-04-17build-sys: make sure kdbus.h is part of tarballZbigniew Jędrzejewski-Szmek
Also fix 'update-man-list' rule and add rules for new man pages.
2013-04-17journalctl: show fields requested with --field in fullZbigniew Jędrzejewski-Szmek
I see little point in silently truncating fields when they are explictly requested. With this change e.g. journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART works as expected.
2013-04-17systemd: ignore hw timestamps in containersZbigniew Jędrzejewski-Szmek
They are irrelevant and misleading. E.g. systemd-analyze: Startup finished in 6d 4h 15min 32.330s (kernel) + 49ms 914us (userspace) = 6d 4h 15min 32.380s becomes Startup finished in 53.735ms (userspace) = 53.735ms which looks much better :)
2013-04-17bash-completion: --property supportZbigniew Jędrzejewski-Szmek
Just bash.
2013-04-17man: fix syntax in nsenter exampleZbigniew Jędrzejewski-Szmek
Apparently nsenter doesn't handle options concatenated together. I'm pretty sure it worked at one point, but it seems like magic, since each of those options can take arguments.
2013-04-17sd-messages.h: add new bootchart message idZbigniew Jędrzejewski-Szmek
2013-04-17core/main: use _cleanup_Zbigniew Jędrzejewski-Szmek
2013-04-17Report about syntax errors with metadataZbigniew Jędrzejewski-Szmek
The information about the unit for which files are being parsed is passed all the way down. This way messages land in the journal with proper UNIT=... or USER_UNIT=... attribution. 'systemctl status' and 'journalctl -u' not displaying those messages has been a source of confusion for users, since the journal entry for a misspelt setting was often logged quite a bit earlier than the failure to start a unit. Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
2013-04-17core: log a few more things under UNIT=...Zbigniew Jędrzejewski-Szmek
2013-04-17core/main: generate 4 parsing functions from a macroZbigniew Jędrzejewski-Szmek
2013-04-17conf-parser: generate 7 parsing functions from a macroZbigniew Jędrzejewski-Szmek
Those functions were identical, apart from typos. Log message is modified to contain the type of destination var (int, double, ...). I think this might make it easier to understand why a value was rejected (e.g. a minus from an unsigned type).
2013-04-17python-systemd: Reader return special fields and _Reader changesSteven Hiscocks
Changes to _Reader make it match closer to C API, by removing `get_next` and `get_previous`. A `get_all` method added, which returns dictionary of fields using C API SD_JOURNAL_FOREACH_DATA macro, which can be used in conjunction with `next`. _Reader `get`, `next`, `get_{realtime,monotonic,cursor}` and new `previous` methods are made private. This is so the traversal and getting of journal fields can be made transparent in the python interface. Reader now solely implements `get_next` and `get_previous`, returning a standard dictionary (future: other mapping types?) with all standard and special fields through the converters. This makes the output the same as journalctl json/export format output. Iterator methods also moved to Reader, as they do not function as intend with changes to _Reader. These changes also mean that more optimised journal interfaces can be made more easily from _Reader, by avoiding getting of unrequired fields by using the `_get` method, and avoiding field conversions.