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

10896 Commits

Author SHA1 Message Date
Koen Kooi
8b3227c90d bootctl: fix help text
It currently says 'time settings', change that to 'boot settings'.
2013-03-29 15:47:43 +01:00
Lennart Poettering
f04c0bd6ed utmp: make gcc shut up, we need to pass an int here, not size_t 2013-03-29 15:47:18 +01:00
Maksim Melnikau
813ac7d3dd cgtop --help: default depth is 3 not 2
use default depth from variable for --help
2013-03-29 15:42:47 +01:00
Zbigniew Jędrzejewski-Szmek
8333c77edf Always use errno > 0 to help gcc
gcc thinks that errno might be negative, and functions could return
something positive on error (-errno). Should not matter in practice,
but makes an -O4 build much quieter.
2013-03-29 10:12:41 -04:00
Zbigniew Jędrzejewski-Szmek
0db809489f journalctl: fix --update-catalog with not --root arg
grawity> `journalctl --update-catalog` from latest git prints:
         "Recursive mkdir .: Invalid argument" and
         "Failed to write : Invalid argument"
2013-03-29 10:12:41 -04:00
Zbigniew Jędrzejewski-Szmek
76877b46b6 tests: add some silly tests for path-util.c 2013-03-28 23:45:59 -04:00
Zbigniew Jędrzejewski-Szmek
13cbf3a5f0 journalctl: support --root for message catalogs 2013-03-28 23:45:59 -04:00
Zbigniew Jędrzejewski-Szmek
844ec79b3c catalog: open up catalog internals
In order to write tests for the catalog functions, they
are made non-static and start taking a 'database' parameter,
which is the name of a file with the preprocessed catalog
entries.

This makes it possible to make test-catalog part of the
normal test suite, since it now only operates on files
in /tmp.

Some more tests are added.
2013-03-28 23:45:59 -04:00
Zbigniew Jędrzejewski-Szmek
18cd5fe99f catalog: make sure strings are terminated
Coverity complains: systemd-199/src/journal/catalog.c:126:
buffer_size_warning: Calling strncpy with a maximum size argument of
32 bytes on destination array "i->language" of size 32 bytes might
leave the destination string unterminated.

...and unfortunately it was right. The string was defined as a
fixed-size string in some parts of the code, and used a
null-terminated string in others (e.g. in log statements). There's no
point in conserving one byte, so just define the max language tag
length to 31 bytes, and use null terminated strings everywhere.

Also, wrap some lines, zero-fill less bytes, use '\0' instead of just
0 to be more explicit that this is one byte.
2013-03-28 23:45:59 -04:00
Václav Pavlín
f459285212 udev: check return value of uname. 2013-03-28 23:45:58 -04:00
Zbigniew Jędrzejewski-Szmek
c309a7137b bootchart: properly terminate string
systemd-199/src/bootchart/store.c:289: buffer_size_warning: Calling
strncpy with a maximum size argument of 256 bytes on destination array
"ps->name" of size 256 bytes might leave the destination string
unterminated.

...and indeed, the string was used as NULL-terminated later on.

pid_cmdline_strncpy is renamed to pid_cmdline_strscpy to commemorate
the fact that it *does* properly terminate the string.
2013-03-28 23:45:52 -04:00
Zbigniew Jędrzejewski-Szmek
2688887653 utmp-wtmp: don't try to read past end of string
systemd-199/src/shared/utmp-wtmp.c:228: buffer_size_warning: Calling
strncpy with a maximum size argument of 32 bytes on destination array
"store.ut_line" of size 32 bytes might leave the destination string
unterminated.

The destination string is unterminated on purpose, but we must
remember that.
2013-03-28 23:24:55 -04:00
Zbigniew Jędrzejewski-Szmek
c8c9c69f39 build-sys: remove papersize option from sphinx
We don't use it currently for anything (no latex output),
but it was messing up stuff if /etc/papersize had comments.
2013-03-28 22:55:52 -04:00
Zbigniew Jędrzejewski-Szmek
5e75606a41 coredump: do not free twice 2013-03-28 22:27:15 -04:00
Lennart Poettering
9ca3c17f20 build-sys: prepare release 200 2013-03-29 03:07:17 +01:00
Lennart Poettering
0c17fbce55 unit: replace remote-fs-setup.target by network-online.target
https://bugzilla.redhat.com/show_bug.cgi?id=787314
2013-03-29 03:07:17 +01:00
Kay Sievers
78a0460588 hwdb: update 2013-03-28 21:53:30 +01:00
Kay Sievers
d8d4bee76c build-sys: fix HAVE/ENABLE_FIRMWARE
https://bugs.freedesktop.org/show_bug.cgi?id=62864
2013-03-28 15:28:10 +01:00
Kay Sievers
0014c5221e bootctl: ESP --> Partition 2013-03-28 11:42:32 +01:00
Kay Sievers
33696ef458 bootctl: Binary: --> File: 2013-03-28 03:43:29 +01:00
William Douglas
f0b647223d man/os-release: Add BUILD_ID field
BUILD_ID is a fairly generic field used to identify the system image
that was used to install the distribution.
2013-03-27 11:15:07 -07:00
Lukas Nykryn
464264ac5a catalog: fix error codes handling in catalog_list_items
Previously r was set to zero and so if(r<0) was never true.
2013-03-27 12:46:36 -04:00
Lukas Nykryn
2e8fb7026d log: fix error codes handling in catalog_list_items
It does not make sense to print error code from previous loop.
2013-03-27 12:01:44 -04:00
Lukas Nykryn
531991b64d sd-bus: check c->path for null instead of path 2013-03-27 12:01:44 -04:00
Eelco Dolstra
6f6fad96ad systemd-sysctl: Handle missing /etc/sysctl.conf properly
Since fabe5c0e5f, systemd-sysctl returns
a non-zero exit code if /etc/sysctl.conf does not exist, due to a
broken ENOENT check.
2013-03-27 12:01:44 -04:00
Václav Pavlín
f36a783ca7 shared: free dt (temporary dir name) on fail
[zj: modified to not to try to rmdir() dir we haven't created.]
2013-03-27 12:01:44 -04:00
Václav Pavlín
ebf4fb3d36 core: check return value of rm_rf_dangerous and warn if it fails 2013-03-27 11:59:14 -04:00
Kay Sievers
3483fab948 bootctl: rename status output header 2013-03-27 13:55:09 +01:00
Martin Pitt
590888a0d0 keymap: Fix Touchpad Toggle on MSI Wind U90/U100
This key is handled by the hardware already, so handling it again in software
nullifies the effect. Newer kernels read the real state and send out a separate
KEY_TOUCHPAD_ON or KEY_TOUCHPAD_OFF event, so in both cases we need to ignore
that key.

https://bugs.freedesktop.org/show_bug.cgi?id=62404
2013-03-27 08:15:12 +01:00
Zbigniew Jędrzejewski-Szmek
49e5de64e2 tests: skip bus test if bus cannot be opened
To make the result more visible, special return value
is used to tell automake that the test was skipped. While
at it, use the same return value in other skipped tests.
2013-03-26 23:50:44 -04:00
Zbigniew Jędrzejewski-Szmek
f7703533a4 tests: fix size_t in format string 2013-03-26 23:50:44 -04:00
Zbigniew Jędrzejewski-Szmek
3baed19327 Simplify the meaning of %s
The rules governing %s where just too complicated. First of
all, looking at $SHELL is dangerous. For systemd --system,
it usually wouldn't be set. But it could be set if the admin
first started a debug shell, let's say /sbin/sash, and then
launched systemd from it. This shouldn't influence how daemons
are started later on, so is better ignored. Similar reasoning
holds for session mode. Some shells set $SHELL, while other
set it only when it wasn't set previously (e.g. zsh). This
results in fragility that is better avoided by ignoring $SHELL
totally.

With $SHELL out of the way, simplify things by saying that
%s==/bin/sh for root, and the configured shell otherwise.
get_shell() is the only caller, so it can be inlined.

Fixes one issue seen with 'make check'.
2013-03-26 23:49:44 -04:00
Lennart Poettering
a63a5c4687 units: automatically order all mount units after network.target
Previously it was necessary to pull in remote-fs-pre.target to order the
mount units against network.target since the ordering was done
transitively via remote-fs-pre.target.

As network implementations shouldn't need to know about the specific
use-case of network mounts we instead now simply order network.target
against all mounts too. This should make it unnecessary for network
managing services to import remote-fs-pre.target explicitly, as
network.target will now suffice.
2013-03-27 02:56:32 +01:00
Lennart Poettering
1183f9b225 man: network.target is also a passive target 2013-03-27 02:56:32 +01:00
Auke Kok
b0640287f7 readahead: cleanups
- check for OOM
- no need to use floats and round()
2013-03-26 11:35:27 -07:00
Auke Kok
94243ef299 readahead: chunk on spinning media
Readahead has all sorts of bad side effects depending on your
storage media. On rotating disks, it may be degrading startup
performance if enough requests are queued spanning linearly
over all blocks early at boot, and mount, blkid and friends
want to insert reads to the start of these block devices after.

The end result is that on spinning disks with ext3/4 that udev
and mounts take a very long time, and nothing really happens until
readahead is completely finished.

This has the net effect that the CPU is almost entirely idle
for the entire period that readahead is working. We could have
finished starting up quite a lot of services in this time if
we were smarter at how we do readahead.

This patch sorts all requests into 2 second "chunks" and sub-sorts
each chunk by block. This adds a single cross-drive seek per "chunk"
but has the benefit that we will have a lot of the blocks we need
early on in the boot sequence loaded into memory faster.

For a comparison of how before/after bootcharts look (ext4 on a
mobile 5400rpm 250GB drive) please look at:

    http://foo-projects.org/~sofar/blocked-tests/

There are bootcharts in the "before" and "after" folders where you
should be able to see that many low-level services finish 5-7
seconds earlier with the patch applied (after).
2013-03-26 10:32:32 -07:00
Zbigniew Jędrzejewski-Szmek
a87197f5a2 NEWS: tweak grammar 2013-03-26 11:56:01 -04:00
Lennart Poettering
efc0ac6af6 NEWS: typo fix 2013-03-26 15:51:57 +01:00
Lennart Poettering
03e1151676 build-sys: bump version and .so revisions 2013-03-26 15:43:43 +01:00
Lennart Poettering
74b1c37174 cryptsetup: when prompting for password use GPT partition label
If there's a GPT partition label set for a LUKS partition, then it's
nicer to show that than the model number, when asking for a passphrase.
2013-03-26 15:24:44 +01:00
Lennart Poettering
dfebfe67dd man: document that the passive units cannot be pulled in mnaully 2013-03-26 15:24:44 +01:00
Harald Hoyer
a87586a171 fstab-generator: drop x-initrd.rootfs mount option
x-initrd.mount now has different meanings, if fstab-generator is called
in the initramfs.

initrd:/etc/fstab and x-initrd.mount defines mounts for the
initrd-root-fs.target

initrd:/sysroot/etc/fstab and x-initrd.mount defines mounts for the
initrd-fs.target
2013-03-26 15:39:29 +01:00
Lennart Poettering
6a9280cc60 units: disallow manual starting of passive units
As passive units only are useful for ordering things within the initial
transaction there is no point in ever activating them manually, hence
refuse it.
2013-03-26 15:15:39 +01:00
Harald Hoyer
4e5ed9b69b fstab-generator: degrade the message about missing "root=" to log_debug
Some installation media (fedora at least) does not have and need a
"root=" argument on the kernel command line.
2013-03-26 14:46:35 +01:00
Martin Pitt
9717120e59 Drop src/login/uaccess.c, dead code
This moved to src/udev/udev-builtin-uaccess.c a while ago.
2013-03-26 13:28:49 +01:00
Lennart Poettering
5a0f6033be bus: fix missing variable initialization 2013-03-26 03:42:03 +01:00
Lennart Poettering
b56c267ffb modules-load: there's really no point in mentioning that a certain modules is already loaded
After all, this runs in parallel to udev, so there's quite a chance it
already is....
2013-03-26 03:13:41 +01:00
Lennart Poettering
62cfa9da28 build-sys: make gcc shut up 2013-03-26 03:03:13 +01:00
Lennart Poettering
810bc2e3d5 build-sys: ship missing unit file 2013-03-26 02:49:11 +01:00
Lennart Poettering
ab9a2ef00b units: downgrade dependency on sockets.target/timers.target/paths.target by basic.target
There isn't really any need to require any targets but sysinit.target
from basic.target, so downgrade sockets.target, paths.target,
timers.target.
2013-03-26 02:32:23 +01:00