Zbigniew Jędrzejewski-Szmek
86e3d32a1d
systemd-python: return both parts of sd_journal_get_monotonic_usec
...
In Python 3, a named tuple is used. In Python 2, a simple
tuple is used. In either case, the pair is (timestamp, bootid).
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek
6a6633a16a
python-systemd: check all errors and use automatic cleanup
...
__REALTIME_TIMESTAMP and __MONOTONIC_TIMESTAMP return ints.
It doesn't make sense to convert to string, just to convert
back to a number later on.
Also try to follow systemd rules for indentation.
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek
d426d8c863
build-sys: upload python documentation to freedesktop.org
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek
5c083fa815
systemd-python: hide ChainMap import
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek
df2795d9f9
systemd-python: document attributes
...
In id128 it would be better to add everything automatically, but
sphinx cannot do this right now.
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek
a244c095c2
systemd-python: use PyModule_AddObject in id128
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek
603c0b7b14
build-sys: make sphinx support uncoditional
...
It needs to be invoked explicitly, so there's no need to check
explicitly.
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek
2c07646764
systemd-python: polish the docstrings
2013-02-28 19:36:14 -05:00
Zbigniew Jędrzejewski-Szmek
33ed3769b5
systemd-python: indenation and style tweaks
2013-02-22 18:09:49 +01:00
Zbigniew Jędrzejewski-Szmek
0d92ee93dc
systemd-python: downgrade _reader.c to C89
2013-02-22 16:57:45 +01:00
Zbigniew Jędrzejewski-Szmek
118bf4bad8
systemd-python: add casts and fix unused variable warnings in _reader
2013-02-22 16:57:45 +01:00
Zbigniew Jędrzejewski-Szmek
ecb6dfe117
systemd-python: wrap some python differences using macros
2013-02-22 16:57:45 +01:00
Zbigniew Jędrzejewski-Szmek
e82e4f4562
systemd-python: introduce error setting helper
2013-02-22 16:57:45 +01:00
Steven Hiscocks
cac40fbe24
systemd-python: Added doc string for Journal
2013-02-22 16:57:45 +01:00
Steven Hiscocks
eccc9e74d2
systemd-python: Journal convert_unicode exception handling change
...
Rather than catch all, is now limited to UnicodeDecodeError
2013-02-22 16:57:44 +01:00
Steven Hiscocks
89d9a23389
systemd-python: add Journal method to add MESSAGE_ID match
2013-02-22 16:57:44 +01:00
Steven Hiscocks
6d0c634ca3
systemd-python: fix memory leak in _reader and minor bugs
...
iternext now checks for error from get_next, and changed a DECREF to
XDECREF rather than NULL check
2013-02-22 16:57:44 +01:00
Steven Hiscocks
c71f26eba5
systemd-python: update Journal python docstrings
2013-02-22 16:57:44 +01:00
Steven Hiscocks
b835982344
systemd-python: tidy up import names in journal
2013-02-22 16:57:44 +01:00
Steven Hiscocks
301ae164b7
systemd-python: Journal this_boot/machine now accepts ID
2013-02-22 16:57:44 +01:00
Steven Hiscocks
dd37d563ba
systemd-python: remove unneeded ifdef for query_unique
2013-02-22 16:57:44 +01:00
Steven Hiscocks
518dc5dff5
systemd-python: _reader now takes unix timestamp in seconds
2013-02-22 16:57:44 +01:00
Steven Hiscocks
83718af6f5
systemd-python: Update _reader docstrings
2013-02-22 16:57:44 +01:00
Steven Hiscocks
5bb2b8d5e4
systemd-python: _reader add_match takes single string
...
python code now takes care of multiple matches
2013-02-22 16:57:44 +01:00
Steven Hiscocks
a49f4d17bf
systemd-python: correct data_threshold error return value
2013-02-22 16:57:44 +01:00
Steven Hiscocks
d2dd0265b5
systemd-python: updated _reader header to standard license
2013-02-22 16:57:44 +01:00
Steven Hiscocks
7a1b9cd5e4
systemd-python: Moved _reader datetime usage to python
2013-02-22 16:57:44 +01:00
Steven Hiscocks
71766afa2d
systemd-python: Tidy up _reader error handling
2013-02-22 16:57:44 +01:00
Steven Hiscocks
bf1ced5503
systemd-python: some python3 and bug fixes
2013-02-22 16:57:44 +01:00
Steven Hiscocks
6a71de70e5
systemd-python: implement this_boot/this_machine in Python
2013-02-22 16:57:43 +01:00
Steven Hiscocks
25523db4e1
systemd-python: Journal log_level moved to python
2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek
c1db45c6a5
sphinx: document Journal class too
2013-02-22 16:57:43 +01:00
Steven Hiscocks
3aa8f0861c
systemd-python: move default call dicts from C to python
2013-02-22 16:57:43 +01:00
Steven Hiscocks
3ce2cc25bb
systemd-python: MESSAGE_ID as UUID for Journal
2013-02-22 16:57:43 +01:00
Steven Hiscocks
2d0603bd97
systemd-python: moved PyRun_String to journal.py code
2013-02-22 16:57:43 +01:00
Steven Hiscocks
c4e9b5b557
systemd-python: add Journal class for reading journal
2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek
9015fa646e
python: build html docs using sphinx
...
Build instructions:
make
make DESTIDIR=/tmp/... install
make DESTIDIR=/tmp/... sphinx-html sphinx-man sphinx-epub ...
2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek
d489071fb3
journalct: also print Python code in --new-id
2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek
afcd68c149
python: utilize uuid.UUID in logging
2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek
927e96326c
python: add systemd.id128 module
...
uuid.UUIDs are utilized to hold UUID values.
2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek
89f603f5d8
TODO: drop two items
2013-02-22 16:55:14 +01:00
Michal Schmidt
47a0eaa60c
systemctl: generalize action table to be usable in more action<->verb mappings
...
Should be no functional change.
2013-02-22 16:06:18 +01:00
Michal Schmidt
b85bdddafb
systemctl: make shutdown operations use irreversible jobs
...
Occasionally people report problem with reboot/poweroff operations hanging in
the middle. One known cause is when a new transaction to start a unit is
enqueued while the shutdown is going on. The start of the unit conflicts with
the shutdown jobs, so they get cancelled. The failure case can be quite unpleasant,
becase getty and sshd may already be stopped.
Fix it by using irreversible jobs for shutdown (reboot/poweroff/...) actions.
This applies to commands like "reboot", "telinit 6", "systemctl reboot". Should
someone desire to use reversible jobs, they can say "systemctl start reboot.target".`
2013-02-22 16:06:17 +01:00
Michal Schmidt
23ade460e5
core, systemctl: add support for irreversible jobs
...
Add a new job mode: replace-irreversibly. Jobs enqueued using this mode
cannot be implicitly canceled by later enqueued conflicting jobs.
They can however still be canceled with an explicit "systemctl cancel"
call.
2013-02-22 16:06:17 +01:00
Michal Schmidt
b7cf6049a3
systemctl: make "systemctl default" use "isolate" job mode
...
"systemctl default" should behave identically to "telinit N" (where N is the
corresponding runlevel target number), therefore it should use isolate job mode
too.
2013-02-22 16:06:17 +01:00
Zbigniew Jędrzejewski-Szmek
6f47ad3025
journal: sd_journal_get_cursor should return 0 on success
...
Documentation states that 0 is correct, and all other
similar functions return 0 on success.
Pointed-out-by: Steven Hiscocks <steven-systemd@hiscocks.me.uk >
2013-02-22 11:19:00 +01:00
Harald Hoyer
2792bd6fef
TODO: removed ratelimit
2013-02-21 10:30:14 +01:00
Harald Hoyer
696164cb5b
fstab-generator: change kernel command line mount path for root
...
Use /sysroot instead of /new_root to mount the real root in the
initramfs.
2013-02-21 10:27:38 +01:00
Max F. Albrecht
22382c3f57
man: be even more clear about ExecStart's first argument.
2013-02-20 13:49:57 -08:00
Thomas Hindoe Paaboel Andersen
8d99e5f530
tests: more tests for util.c
...
tests for:
test_parse_pid
test_parse_uid
test_safe_atolli
test_safe_atod
2013-02-20 22:36:43 +01:00