Commit graph

10 commits

Author SHA1 Message Date
Lennart Poettering 3ffd4af220 util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over.
2015-10-25 13:19:18 +01:00
Lennart Poettering 07630cea1f util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.

This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.

Also touches a few unrelated include files.
2015-10-24 23:05:02 +02:00
Hristo Venev e4eaf99a31 basic: parse_timestamp UTC and fractional seconds support 2015-10-15 02:57:57 +03:00
Hristo Venev 7c67c79c9a basic: add mktime_or_timegm and localtime_or_gmtime_r
to time-util.h. They take an extra argument `bool utc`.
2015-10-15 02:34:45 +03:00
Thomas Hindoe Paaboel Andersen 64d6c22905 tree-wide: do not shadow the global var timezone 2015-09-01 18:20:13 +02:00
Tom Gundersen 84d449b552 Merge pull request #1063 from poettering/dbus-interface-from-type
cgls/cgtop: a variety of modernizations
2015-08-28 12:01:46 +02:00
Lennart Poettering 45d7a8bb6c cgtop: major modernizations
In preparation of the unified cgroup support, let's clean up cgtop:

a) rework time code to be based on "nsec_t" rather than "struct timespec"

b) Introduce long option --order= for selecting ordering

c) count number of processes only in the main hierarchy, don't bother
   with the controller hierarchies. We don't allow orthogonal
   hierarchies in systemd anymore, hence there's no point to check the
   other hierarchies.

d) Deal with non-monotonic cpuacct values (see #749)

e) When sorting groups, don't do prefix compare when ordering by number
   of tasks, since this is not accumulative for all children.

f) Actually make --cpu without parameter work

g) Don't output control characters when we get them as input.

Fixes #749.
2015-08-28 02:27:29 +02:00
Lennart Poettering 5c904ba5a5 time-util: add new get_timezone() call to get local timezone
Let's move the timedated-specific code to time-util.h and make it
generic.
2015-08-26 20:36:42 +02:00
Lennart Poettering fbe550738d machined: introduce pseudo-machine ".host" refererring to the host system
Some of the operations machined/machinectl implement are also very
useful when applied to the host system (such as machinectl login,
machinectl shell or machinectl status), hence introduce a pseudo-machine
by the name of ".host" in machined that refers to the host system, and
may be used top execute operations on the host system with.

This copies the pseudo-image ".host" machined already implements for
image related commands.

(This commit also adds a PK privilege for opening a PTY in a container,
which was previously not accessible for non-root.)
2015-08-24 22:46:45 +02:00
Kay Sievers a095315b3c build-sys: split internal basic/ library from shared/
basic/      can be used by everything
            cannot use anything outside of basic/

libsystemd/ can use basic/
            cannot use shared/

shared/     can use libsystemd/
2015-06-11 10:52:46 +02:00
Renamed from src/shared/time-util.c (Browse further)