Backport fixes, documentation, and hwdb changes

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-01-14 19:04:08 -05:00
parent 627fdaef23
commit 12622292b9
101 changed files with 15548 additions and 14 deletions

View File

@ -44,6 +44,3 @@ index 5397bd6..610fe88 100644
}
}
}
--
1.8.4.2

View File

@ -23,6 +23,3 @@ index 610fe88..e02c207 100644
char *state, *w;
size_t l;
--
1.8.4.2

View File

@ -0,0 +1,23 @@
From 371ce08fb9814a39ca2f984d6040aaf0f6c172e8 Mon Sep 17 00:00:00 2001
From: Dan McGee <dan@archlinux.org>
Date: Sun, 8 Dec 2013 14:33:45 -0600
Subject: [PATCH] Fix memory leak in stdout journal streams
Just as 'identifier' is strdup-ed and freed, we need to do the same for
unit_id.
---
src/journal/journald-stream.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
index 9c4efec..4080622 100644
--- a/src/journal/journald-stream.c
+++ b/src/journal/journald-stream.c
@@ -339,6 +339,7 @@ void stdout_stream_free(StdoutStream *s) {
#endif
free(s->identifier);
+ free(s->unit_id);
free(s);
}

View File

@ -0,0 +1,92 @@
From 77e9da01ad6383aab4d50a00b705ec96f16cb55e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 8 Dec 2013 18:56:16 -0500
Subject: [PATCH] man: document 'is-enabled' output
https://bugzilla.redhat.com/show_bug.cgi?id=953077
---
man/systemctl.xml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 59 insertions(+), 5 deletions(-)
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 166282c..b4bc15d 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -437,7 +437,7 @@ systemctl start foo
<listitem>
<para>When used with <command>enable</command>,
- <command>disable</command>, <command>is-enabled</command>
+ <command>disable</command>,
(and related commands), make changes only temporarily, so
that they are lost on the next reboot. This will have the
effect that changes are not made in subdirectories of
@@ -885,10 +885,64 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
<listitem>
<para>Checks whether any of the specified unit files are
- enabled (as with <command>enable</command>). Returns an exit
- code of 0 if at least one is enabled, non-zero
- otherwise. Prints the current enable status. To suppress
- this output, use <option>--quiet</option>.</para>
+ enabled (as with <command>enable</command>). Returns an
+ exit code of 0 if at least one is enabled, non-zero
+ otherwise. Prints the current enable status (see table).
+ To suppress this output, use <option>--quiet</option>.
+ </para>
+
+ <table>
+ <title>
+ <command>is-enabled</command> output
+ </title>
+
+ <tgroup cols='3'>
+ <thead>
+ <row>
+ <entry>Printed string</entry>
+ <entry>Meaning</entry>
+ <entry>Return value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>enabled</literal></entry>
+ <entry morerows='1'>Enabled through a symlink in <filename>.wants</filename> directory (permanently or just in <filename>/run</filename>)</entry>
+ <entry morerows='1'>0</entry>
+ </row>
+ <row>
+ <entry><literal>enabled-runtime</literal></entry>
+ </row>
+ <row>
+ <entry><literal>linked</literal></entry>
+ <entry morerows='1'>Made available through a symlink to the unit file (permanently or just in <filename>/run</filename>)</entry>
+ <entry morerows='1'>1</entry>
+ </row>
+ <row>
+ <entry><literal>linked-runtime</literal></entry>
+ </row>
+ <row>
+ <entry><literal>masked</literal></entry>
+ <entry morerows='1'>Disabled entirely (permanently or just in <filename>/run</filename>)</entry>
+ <entry morerows='1'>1</entry>
+ </row>
+ <row>
+ <entry><literal>masked-runtime</literal></entry>
+ </row>
+ <row>
+ <entry><literal>static</literal></entry>
+ <entry>Unit is not enabled, but has no provisions for enabling in [Install] section</entry>
+ <entry>1</entry>
+ </row>
+ <row>
+ <entry><literal>disabled</literal></entry>
+ <entry>Unit is not enabled</entry>
+ <entry>1</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
</listitem>
</varlistentry>

View File

@ -0,0 +1,32 @@
From d4ae9b53caa77d17528d36610ad70dd2eb1bb54c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 6 Jan 2014 12:16:55 +0000
Subject: [PATCH] hostnamed: avoid using NULL in error path
https://bugzilla.redhat.com/show_bug.cgi?id=1047335
---
src/hostname/hostnamed.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 6a43aeb..0c24b65 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -637,7 +637,7 @@ static int connect_bus(DBusConnection **_bus) {
if (!bus) {
log_error("Failed to get system D-Bus connection: %s", bus_error_message(&error));
r = -ECONNREFUSED;
- goto fail;
+ goto fail2;
}
dbus_connection_set_exit_on_disconnect(bus, FALSE);
@@ -669,7 +669,7 @@ static int connect_bus(DBusConnection **_bus) {
fail:
dbus_connection_close(bus);
dbus_connection_unref(bus);
-
+fail2:
dbus_error_free(&error);
return r;

View File

@ -0,0 +1,31 @@
From 524147c1ef991edf4432aac51c880b363b4402df Mon Sep 17 00:00:00 2001
From: Marius Vollmer <mvollmer@redhat.com>
Date: Thu, 31 Oct 2013 15:55:07 +0200
Subject: [PATCH] logind: use correct "who" enum values with KillUnit.
---
src/login/logind-dbus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index bb85c7d..583d62e 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -2799,7 +2799,7 @@ int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo
assert(manager);
assert(unit);
- w = who == KILL_LEADER ? "process" : "cgroup";
+ w = who == KILL_LEADER ? "control" : "all";
assert_cc(sizeof(signo) == sizeof(int32_t));
r = bus_method_call_with_reply(
@@ -2815,7 +2815,7 @@ int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo
DBUS_TYPE_INT32, &signo,
DBUS_TYPE_INVALID);
if (r < 0) {
- log_error("Failed to stop unit %s: %s", unit, bus_error(error, r));
+ log_error("Failed to kill unit %s: %s", unit, bus_error(error, r));
return r;
}

View File

@ -0,0 +1,49 @@
From 106c98f6b08d3b9254b419b09bc4ceed1963d7aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 14 Jan 2014 17:31:00 -0500
Subject: [PATCH] Revert "systemd: add a start job for all units specified with
SYSTEMD_WANTS="
This reverts commit 043a559ff3732439fc61872a6320ee0a05dd088f.
This was a mistake, and was reverted upstream.
---
src/core/device.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/core/device.c b/src/core/device.c
index e02c207..f79c206 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -282,8 +282,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
size_t l;
FOREACH_WORD_QUOTED(w, l, wants, state) {
- _cleanup_free_ char *e, *n = NULL;
- Unit *other;
+ char *e, *n;
e = strndup(w, l);
if (!e) {
@@ -295,19 +294,12 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
r = -ENOMEM;
goto fail;
}
+ free(e);
r = unit_add_dependency_by_name(u, UNIT_WANTS, n, NULL, true);
+ free(n);
if (r < 0)
goto fail;
-
- other = manager_get_unit(u->manager, n);
- if (!other || !unit_can_start(other))
- continue;
-
- r = manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, true, NULL, NULL);
- if (r < 0)
- log_warning("Failed to add job %s/%s, ignoring: %s.",
- other->id, job_type_to_string(JOB_START), strerror(-r));
}
}
}

View File

@ -0,0 +1,87 @@
From 85a77eea8d7114675602a33d2e067fd7c4ad0624 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 12 Jan 2014 11:38:56 -0500
Subject: [PATCH] core: do not segfault if swap activity happens when
/proc/swaps is not open
In https://bugzilla.redhat.com/show_bug.cgi?id=969795 systemd crashes
in swap_dispatch_reload called from manager_loop becuase m->proc_swaps
is NULL. It can legitimately be NULL if something went wrong when
initially enumerating swap devices when starting the manager. This
is probably a sign of significant trouble, but let's do our best
to recover.
---
src/core/swap.c | 45 +++++++++++++++++++++++++++++----------------
1 file changed, 29 insertions(+), 16 deletions(-)
diff --git a/src/core/swap.c b/src/core/swap.c
index 147f710..f295b65 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -1068,14 +1068,40 @@ static int swap_load_proc_swaps(Manager *m, bool set_flags) {
return r;
}
+static int open_proc_swaps(Manager *m) {
+ if (!m->proc_swaps) {
+ struct epoll_event ev = {
+ .events = EPOLLPRI,
+ .data.ptr = &m->swap_watch,
+ };
+
+ m->proc_swaps = fopen("/proc/swaps", "re");
+ if (!m->proc_swaps)
+ return (errno == ENOENT) ? 0 : -errno;
+
+ m->swap_watch.type = WATCH_SWAP;
+ m->swap_watch.fd = fileno(m->proc_swaps);
+
+ if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->swap_watch.fd, &ev) < 0)
+ return -errno;
+ }
+
+ return 0;
+}
+
int swap_dispatch_reload(Manager *m) {
/* This function should go as soon as the kernel properly notifies us */
+ int r;
if (_likely_(!m->request_reload))
return 0;
m->request_reload = false;
+ r = open_proc_swaps(m);
+ if (r < 0)
+ return r;
+
return swap_fd_event(m, EPOLLPRI);
}
@@ -1225,22 +1251,9 @@ static int swap_enumerate(Manager *m) {
int r;
assert(m);
- if (!m->proc_swaps) {
- struct epoll_event ev = {
- .events = EPOLLPRI,
- .data.ptr = &m->swap_watch,
- };
-
- m->proc_swaps = fopen("/proc/swaps", "re");
- if (!m->proc_swaps)
- return (errno == ENOENT) ? 0 : -errno;
-
- m->swap_watch.type = WATCH_SWAP;
- m->swap_watch.fd = fileno(m->proc_swaps);
-
- if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->swap_watch.fd, &ev) < 0)
- return -errno;
- }
+ r = open_proc_swaps(m);
+ if (r < 0)
+ return r;
r = swap_load_proc_swaps(m, false);
if (r < 0)

View File

@ -0,0 +1,69 @@
From cb5fd30c9ca64024335129d393c15a9586433ca2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 8 Dec 2013 07:46:46 -0500
Subject: [PATCH] kernel-install: add -h/--help
---
src/kernel-install/kernel-install | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
index 9d3e75d..f5ff362 100644
--- a/src/kernel-install/kernel-install
+++ b/src/kernel-install/kernel-install
@@ -21,9 +21,9 @@
usage()
{
- echo "Usage:" >&2
- echo " $0 add <kernel-version> <kernel-image>" >&2
- echo " $0 remove <kernel-version> <kernel-image>" >&2
+ echo "Usage:"
+ echo " $0 add KERNEL-VERSION KERNEL-IMAGE"
+ echo " $0 remove KERNEL-VERSION KERNEL-IMAGE"
}
dropindirs_sort()
@@ -54,6 +54,13 @@ dropindirs_sort()
export LC_COLLATE=C
+for i in "$@"; do
+ if [ "$i" == "--help" -o "$i" == "-h" ]; then
+ usage
+ exit 0
+ fi
+done
+
if [[ "${0##*/}" == 'installkernel' ]]; then
COMMAND='add'
else
@@ -75,7 +82,7 @@ if ! [[ $MACHINE_ID ]]; then
fi
if [[ ! $COMMAND ]] || [[ ! $KERNEL_VERSION ]]; then
- usage
+ echo "Not enough arguments" >&2
exit 1
fi
@@ -90,8 +97,8 @@ readarray -t PLUGINS < <(
case $COMMAND in
add)
- if [[ ! $KERNEL_IMAGE ]]; then
- usage
+ if [[ ! "$KERNEL_IMAGE" ]]; then
+ echo "Command 'add' requires an argument" >&2
exit 1
fi
@@ -121,7 +128,7 @@ case $COMMAND in
;;
*)
- usage
+ echo "Unknown command '$COMMAND'" >&2
exit 1
;;
esac

View File

@ -0,0 +1,25 @@
From 245b830c77bfbac0346bd1df3fa5d6b81d77014a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= <seblu@seblu.net>
Date: Thu, 5 Dec 2013 02:55:05 +0100
Subject: [PATCH] kernel-install: fix help output
Kernel install doesn't need the second argument on his command line when
removing.
This is correctly documented in the man page.
---
src/kernel-install/kernel-install | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
index f5ff362..3ae1d77 100644
--- a/src/kernel-install/kernel-install
+++ b/src/kernel-install/kernel-install
@@ -23,7 +23,7 @@ usage()
{
echo "Usage:"
echo " $0 add KERNEL-VERSION KERNEL-IMAGE"
- echo " $0 remove KERNEL-VERSION KERNEL-IMAGE"
+ echo " $0 remove KERNEL-VERSION"
}
dropindirs_sort()

View File

@ -0,0 +1,67 @@
From 07e7e0378c3f2b73e56e886f7a4b59068dbbbc55 Mon Sep 17 00:00:00 2001
From: "Jason St. John" <jstjohn@purdue.edu>
Date: Tue, 10 Dec 2013 00:10:03 -0500
Subject: [PATCH] man: improve wording and comma usage in
systemd.journal-fields(7)
Improve wording under "Description" and "_KERNEL_DEVICE="
---
man/systemd.journal-fields.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml
index 8a15598..bb89ed5 100644
--- a/man/systemd.journal-fields.xml
+++ b/man/systemd.journal-fields.xml
@@ -51,14 +51,14 @@
<title>Description</title>
<para>Entries in the journal resemble an environment
- block in their syntax, however with fields that can
+ block in their syntax but with fields that can
include binary data. Primarily, fields are formatted
UTF-8 text strings, and binary formatting is used only
where formatting as UTF-8 text strings makes little
sense. New fields may freely be defined by
applications, but a few fields have special
meaning. All fields with special meanings are
- optional. In some cases fields may appear more than
+ optional. In some cases, fields may appear more than
once per entry.</para>
</refsect1>
@@ -176,7 +176,7 @@
<term><varname>_UID=</varname></term>
<term><varname>_GID=</varname></term>
<listitem>
- <para>The process, user and
+ <para>The process, user, and
group ID of the process the
journal entry originates from
formatted as a decimal
@@ -190,7 +190,7 @@
<term><varname>_CMDLINE=</varname></term>
<listitem>
<para>The name, the executable
- path and the command line of
+ path, and the command line of
the process the journal entry
originates from.</para>
</listitem>
@@ -389,12 +389,12 @@
the major and minor of the
device node, separated by <literal>:</literal>
and prefixed by <literal>b</literal>. Similar
- for character devices, but
+ for character devices but
prefixed by <literal>c</literal>. For network
- devices the interface index,
+ devices, this is the interface index
prefixed by <literal>n</literal>. For all other
- devices <literal>+</literal> followed by the
- subsystem name, followed by
+ devices, this is the subsystem name
+ prefixed by <literal>+</literal>, followed by
<literal>:</literal>, followed by the kernel
device name.</para>
</listitem>

View File

@ -0,0 +1,84 @@
From 26dcf06766bc1fc533d301831838e9e302315134 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Mon, 9 Dec 2013 21:58:34 -0800
Subject: [PATCH] drop several entries from kbd-model-map whose kbd layouts do
not exist
kbd-model-map was generated from system-config-keyboard's keyboard_models.py.
Several of the kbd layouts referred in that file do not exist and, so far as I
can tell, never did. I believe these entries existed simply to provide the xkb
configuration information for those layouts, and there never were matching kbd
entries; the kbd names were entirely notional, to satisfy the need for some
entry or other in that field.
For systemd, the only function of kbd-model-map is to 'match' kbd and xkb
configurations, so it does not make any sense to maintain entries for cases
where only one or the other exists in this context.
---
src/locale/kbd-model-map | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/src/locale/kbd-model-map b/src/locale/kbd-model-map
index 1fe9bca..78c7887 100644
--- a/src/locale/kbd-model-map
+++ b/src/locale/kbd-model-map
@@ -4,22 +4,18 @@ sg ch pc105 de_nodeadkeys terminate:ctrl_alt_bksp
nl nl pc105 - terminate:ctrl_alt_bksp
mk-utf mk,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
trq tr pc105 - terminate:ctrl_alt_bksp
-guj in,us pc105 guj terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
uk gb pc105 - terminate:ctrl_alt_bksp
is-latin1 is pc105 - terminate:ctrl_alt_bksp
de de pc105 - terminate:ctrl_alt_bksp
-gur gur,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
la-latin1 latam pc105 - terminate:ctrl_alt_bksp
us us pc105+inet - terminate:ctrl_alt_bksp
ko kr pc105 - terminate:ctrl_alt_bksp
ro-std ro pc105 std terminate:ctrl_alt_bksp
de-latin1 de pc105 - terminate:ctrl_alt_bksp
-tml-inscript in,us pc105 tam terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
slovene si pc105 - terminate:ctrl_alt_bksp
hu101 hu pc105 qwerty terminate:ctrl_alt_bksp
jp106 jp jp106 - terminate:ctrl_alt_bksp
croat hr pc105 - terminate:ctrl_alt_bksp
-ben-probhat in,us pc105 ben_probhat terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
fi-latin1 fi pc105 - terminate:ctrl_alt_bksp
it2 it pc105 - terminate:ctrl_alt_bksp
hu hu pc105 - terminate:ctrl_alt_bksp
@@ -29,7 +25,6 @@ fr_CH ch pc105 fr terminate:ctrl_alt_bksp
dk-latin1 dk pc105 - terminate:ctrl_alt_bksp
fr fr pc105 - terminate:ctrl_alt_bksp
it it pc105 - terminate:ctrl_alt_bksp
-tml-uni in,us pc105 tam_TAB terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
ua-utf ua,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
fr-latin1 fr pc105 - terminate:ctrl_alt_bksp
sg-latin1 ch pc105 de_nodeadkeys terminate:ctrl_alt_bksp
@@ -39,16 +34,12 @@ fr-pc fr pc105 - terminate:ctrl_alt_bksp
bg_pho-utf8 bg,us pc105 ,phonetic terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
it-ibm it pc105 - terminate:ctrl_alt_bksp
cz-us-qwertz cz,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
-ar-digits ara,us pc105 digits terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
br-abnt2 br abnt2 - terminate:ctrl_alt_bksp
ro ro pc105 - terminate:ctrl_alt_bksp
us-acentos us pc105 intl terminate:ctrl_alt_bksp
pt-latin1 pt pc105 - terminate:ctrl_alt_bksp
ro-std-cedilla ro pc105 std_cedilla terminate:ctrl_alt_bksp
tj tj pc105 - terminate:ctrl_alt_bksp
-ar-qwerty ara,us pc105 qwerty terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
-ar-azerty-digits ara,us pc105 azerty_digits terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
-ben in,us pc105 ben terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
de-latin1-nodeadkeys de pc105 nodeadkeys terminate:ctrl_alt_bksp
no no pc105 - terminate:ctrl_alt_bksp
bg_bds-utf8 bg,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
@@ -60,11 +51,8 @@ pl2 pl pc105 - terminate:ctrl_alt_bksp
es es pc105 - terminate:ctrl_alt_bksp
ro-cedilla ro pc105 cedilla terminate:ctrl_alt_bksp
ie ie pc105 - terminate:ctrl_alt_bksp
-ar-azerty ara,us pc105 azerty terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
-ar-qwerty-digits ara,us pc105 qwerty_digits terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
et ee pc105 - terminate:ctrl_alt_bksp
sk-qwerty sk pc105 - terminate:ctrl_alt_bksp,qwerty
-dev dev,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll
fr-latin9 fr pc105 latin9 terminate:ctrl_alt_bksp
fr_CH-latin1 ch pc105 fr terminate:ctrl_alt_bksp
cf ca pc105 - terminate:ctrl_alt_bksp

View File

@ -0,0 +1,22 @@
From bc0cbe40cbfde7e8194f6f4b9b17e7102efa35c7 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Mon, 9 Dec 2013 22:02:25 -0800
Subject: [PATCH] correct name of Tajik kbd layout in kbd-model-map
---
src/locale/kbd-model-map | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/locale/kbd-model-map b/src/locale/kbd-model-map
index 78c7887..322c0a9 100644
--- a/src/locale/kbd-model-map
+++ b/src/locale/kbd-model-map
@@ -39,7 +39,7 @@ ro ro pc105 - terminate:ctrl_alt_bksp
us-acentos us pc105 intl terminate:ctrl_alt_bksp
pt-latin1 pt pc105 - terminate:ctrl_alt_bksp
ro-std-cedilla ro pc105 std_cedilla terminate:ctrl_alt_bksp
-tj tj pc105 - terminate:ctrl_alt_bksp
+tj_alt-UTF8 tj pc105 - terminate:ctrl_alt_bksp
de-latin1-nodeadkeys de pc105 nodeadkeys terminate:ctrl_alt_bksp
no no pc105 - terminate:ctrl_alt_bksp
bg_bds-utf8 bg,us pc105 - terminate:ctrl_alt_bksp,grp:shifts_toggle,grp_led:scroll

View File

@ -0,0 +1,35 @@
From 4ee475e4786ac69b74a75fd668f0bb8e07bdde2d Mon Sep 17 00:00:00 2001
From: Marcel Holtmann <marcel@holtmann.org>
Date: Tue, 10 Dec 2013 03:17:39 -0800
Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
---
hwdb/20-bluetooth-vendor-product.hwdb | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
index dcc25bb..6f8301f 100644
--- a/hwdb/20-bluetooth-vendor-product.hwdb
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
@@ -821,3 +821,21 @@ bluetooth:v010F*
bluetooth:v0110*
ID_VENDOR_FROM_DATABASE=Nippon Seiki Co., Ltd.
+
+bluetooth:v0111*
+ ID_VENDOR_FROM_DATABASE=Steelseries ApS
+
+bluetooth:v0112*
+ ID_VENDOR_FROM_DATABASE=vyzybl Inc.
+
+bluetooth:v0113*
+ ID_VENDOR_FROM_DATABASE=Openbrain Technologies, Co., Ltd.
+
+bluetooth:v0114*
+ ID_VENDOR_FROM_DATABASE=Xensr
+
+bluetooth:v0115*
+ ID_VENDOR_FROM_DATABASE=e.solutions
+
+bluetooth:v0116*
+ ID_VENDOR_FROM_DATABASE=1OAK Technologies

View File

@ -0,0 +1,33 @@
From d8b3047ccb52c2b55683f2fe12f0674f63d746cb Mon Sep 17 00:00:00 2001
From: Dan McGee <dan@archlinux.org>
Date: Sun, 8 Dec 2013 13:27:05 -0600
Subject: [PATCH] Ensure unit is journaled for short-lived or oneshot processes
In the time it takes to process incoming log messages, the process we
are logging details for may exit. This means the cgroup data is no
longer available from '/proc'. Unfortunately, the way the code was
structured before, we never log _SYSTEMD_UNIT if we don't have this
cgroup information.
Add an else if case that allows the passed in unit_id to be logged even
if we couldn't capture cgroup information. This ensures a command like
`journalctl -u run-XXX` will return all log messages from a oneshot
process.
---
src/journal/journald-server.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index a0a8e9c..1fcb3d5 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -626,6 +626,9 @@ static void dispatch_message_real(
}
free(c);
+ } else if (unit_id) {
+ x = strappenda("_SYSTEMD_UNIT=", unit_id);
+ IOVEC_SET_STRING(iovec[n++], x);
}
#ifdef HAVE_SELINUX

View File

@ -0,0 +1,62 @@
From 4c5b792c88c81d0595a1273804d2cd405140f81d Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Tue, 10 Dec 2013 16:36:45 +0100
Subject: [PATCH] libudev: hwdb - use libudev not systemd logging
---
src/libudev/libudev-hwdb.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c
index de1cb83..ba43b9f 100644
--- a/src/libudev/libudev-hwdb.c
+++ b/src/libudev/libudev-hwdb.c
@@ -277,38 +277,38 @@ _public_ struct udev_hwdb *udev_hwdb_new(struct udev *udev) {
hwdb->f = fopen("/etc/udev/hwdb.bin", "re");
if (!hwdb->f) {
- log_debug("error reading /etc/udev/hwdb.bin: %m");
+ udev_dbg(udev, "error reading /etc/udev/hwdb.bin: %m");
udev_hwdb_unref(hwdb);
return NULL;
}
if (fstat(fileno(hwdb->f), &hwdb->st) < 0 ||
(size_t)hwdb->st.st_size < offsetof(struct trie_header_f, strings_len) + 8) {
- log_debug("error reading /etc/udev/hwdb.bin: %m");
+ udev_dbg(udev, "error reading /etc/udev/hwdb.bin: %m");
udev_hwdb_unref(hwdb);
return NULL;
}
hwdb->map = mmap(0, hwdb->st.st_size, PROT_READ, MAP_SHARED, fileno(hwdb->f), 0);
if (hwdb->map == MAP_FAILED) {
- log_debug("error mapping /etc/udev/hwdb.bin: %m");
+ udev_dbg(udev, "error mapping /etc/udev/hwdb.bin: %m");
udev_hwdb_unref(hwdb);
return NULL;
}
if (memcmp(hwdb->map, sig, sizeof(hwdb->head->signature)) != 0 ||
(size_t)hwdb->st.st_size != le64toh(hwdb->head->file_size)) {
- log_debug("error recognizing the format of /etc/udev/hwdb.bin");
+ udev_dbg(udev, "error recognizing the format of /etc/udev/hwdb.bin");
udev_hwdb_unref(hwdb);
return NULL;
}
- log_debug("=== trie on-disk ===\n");
- log_debug("tool version: %"PRIu64, le64toh(hwdb->head->tool_version));
- log_debug("file size: %8llu bytes\n", (unsigned long long) hwdb->st.st_size);
- log_debug("header size %8"PRIu64" bytes\n", le64toh(hwdb->head->header_size));
- log_debug("strings %8"PRIu64" bytes\n", le64toh(hwdb->head->strings_len));
- log_debug("nodes %8"PRIu64" bytes\n", le64toh(hwdb->head->nodes_len));
+ udev_dbg(udev, "=== trie on-disk ===\n");
+ udev_dbg(udev, "tool version: %"PRIu64, le64toh(hwdb->head->tool_version));
+ udev_dbg(udev, "file size: %8llu bytes\n", (unsigned long long) hwdb->st.st_size);
+ udev_dbg(udev, "header size %8"PRIu64" bytes\n", le64toh(hwdb->head->header_size));
+ udev_dbg(udev, "strings %8"PRIu64" bytes\n", le64toh(hwdb->head->strings_len));
+ udev_dbg(udev, "nodes %8"PRIu64" bytes\n", le64toh(hwdb->head->nodes_len));
return hwdb;
}

View File

@ -0,0 +1,25 @@
From 906a89f8e60c9a39610afd7edbc41f79a3c711e7 Mon Sep 17 00:00:00 2001
From: Shawn Landden <shawn@churchofgit.com>
Date: Tue, 10 Dec 2013 09:28:26 -0800
Subject: [PATCH] core/manager: remove infinite loop
---
src/core/manager.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index 944c196..a34a3c6 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2285,10 +2285,8 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
}
finish:
- if (ferror(f)) {
+ if (ferror(f))
r = -EIO;
- goto finish;
- }
assert(m->n_reloading > 0);
m->n_reloading --;

View File

@ -0,0 +1,34 @@
From b7b1af75b9f76f3bff35369b0c1666890c586144 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 10 Dec 2013 18:53:03 +0000
Subject: [PATCH] util: check for overflow in greedy_realloc()
Conflicts:
src/shared/util.c
---
src/shared/util.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/shared/util.c b/src/shared/util.c
index 1510c5e..02bae90 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -5832,10 +5832,18 @@ void* greedy_realloc(void **p, size_t *allocated, size_t need) {
size_t a;
void *q;
+ assert(p);
+ assert(allocated);
+
if (*allocated >= need)
return *p;
a = MAX(64u, need * 2);
+
+ /* check for overflows */
+ if (a < need)
+ return NULL;
+
q = realloc(*p, a);
if (!q)
return NULL;

View File

@ -0,0 +1,35 @@
From ce69ab385535d23bec04018941b0cda19d2d4855 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 10 Dec 2013 19:51:47 +0000
Subject: [PATCH] journald: use a bit more cleanup magic!
---
src/journal/journald-stream.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
index 4080622..771a2bd 100644
--- a/src/journal/journald-stream.c
+++ b/src/journal/journald-stream.c
@@ -75,7 +75,7 @@ struct StdoutStream {
static int stdout_stream_log(StdoutStream *s, const char *p) {
struct iovec iovec[N_IOVEC_META_FIELDS + 5];
- char *message = NULL, *syslog_priority = NULL, *syslog_facility = NULL, *syslog_identifier = NULL;
+ _cleanup_free_ char *message = NULL, *syslog_priority = NULL, *syslog_facility = NULL, *syslog_identifier = NULL;
unsigned n = 0;
int priority;
char *label = NULL;
@@ -128,12 +128,6 @@ static int stdout_stream_log(StdoutStream *s, const char *p) {
#endif
server_dispatch_message(s->server, iovec, n, ELEMENTSOF(iovec), &s->ucred, NULL, label, label_len, s->unit_id, priority, 0);
-
- free(message);
- free(syslog_priority);
- free(syslog_facility);
- free(syslog_identifier);
-
return 0;
}

View File

@ -0,0 +1,110 @@
From feaaf9358a0bd619ef77dca732aa08e21f5c1a56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 10 Dec 2013 06:17:01 -0500
Subject: [PATCH] journald: malloc less when streaming messages
---
src/journal/journald-stream.c | 23 ++++++++++++-----------
src/journal/journald-syslog.c | 4 ++--
src/journal/journald-syslog.h | 2 +-
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
index 771a2bd..aae381b 100644
--- a/src/journal/journald-stream.c
+++ b/src/journal/journald-stream.c
@@ -75,9 +75,11 @@ struct StdoutStream {
static int stdout_stream_log(StdoutStream *s, const char *p) {
struct iovec iovec[N_IOVEC_META_FIELDS + 5];
- _cleanup_free_ char *message = NULL, *syslog_priority = NULL, *syslog_facility = NULL, *syslog_identifier = NULL;
- unsigned n = 0;
int priority;
+ char syslog_priority[] = "PRIORITY=\0";
+ char syslog_facility[sizeof("SYSLOG_FACILITY=") + DECIMAL_STR_MAX(priority)];
+ _cleanup_free_ char *message = NULL, *syslog_identifier = NULL;
+ unsigned n = 0;
char *label = NULL;
size_t label_len = 0;
@@ -90,7 +92,7 @@ static int stdout_stream_log(StdoutStream *s, const char *p) {
priority = s->priority;
if (s->level_prefix)
- syslog_parse_priority((char**) &p, &priority, false);
+ syslog_parse_priority(&p, &priority, false);
if (s->forward_to_syslog || s->server->forward_to_syslog)
server_forward_syslog(s->server, syslog_fixup_facility(priority), s->identifier, p, &s->ucred, NULL);
@@ -103,12 +105,13 @@ static int stdout_stream_log(StdoutStream *s, const char *p) {
IOVEC_SET_STRING(iovec[n++], "_TRANSPORT=stdout");
- if (asprintf(&syslog_priority, "PRIORITY=%i", priority & LOG_PRIMASK) >= 0)
- IOVEC_SET_STRING(iovec[n++], syslog_priority);
+ syslog_priority[strlen("PRIORITY=")] = '0' + LOG_PRI(priority);
+ IOVEC_SET_STRING(iovec[n++], syslog_priority);
- if (priority & LOG_FACMASK)
- if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0)
- IOVEC_SET_STRING(iovec[n++], syslog_facility);
+ if (priority & LOG_FACMASK) {
+ snprintf(syslog_facility, sizeof(syslog_facility), "SYSLOG_FACILITY=%i", LOG_FAC(priority));
+ IOVEC_SET_STRING(iovec[n++], syslog_facility);
+ }
if (s->identifier) {
syslog_identifier = strappend("SYSLOG_IDENTIFIER=", s->identifier);
@@ -408,7 +411,7 @@ fail:
int server_open_stdout_socket(Server *s) {
int r;
- struct epoll_event ev;
+ struct epoll_event ev = { .events = EPOLLIN };
assert(s);
@@ -441,8 +444,6 @@ int server_open_stdout_socket(Server *s) {
} else
fd_nonblock(s->stdout_fd, 1);
- zero(ev);
- ev.events = EPOLLIN;
ev.data.fd = s->stdout_fd;
if (epoll_ctl(s->epoll_fd, EPOLL_CTL_ADD, s->stdout_fd, &ev) < 0) {
log_error("Failed to add stdout server fd to epoll object: %m");
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
index c2770a5..5d9b665 100644
--- a/src/journal/journald-syslog.c
+++ b/src/journal/journald-syslog.c
@@ -236,7 +236,7 @@ size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid)
return e;
}
-void syslog_parse_priority(char **p, int *priority, bool with_facility) {
+void syslog_parse_priority(const char **p, int *priority, bool with_facility) {
int a = 0, b = 0, c = 0;
int k;
@@ -365,7 +365,7 @@ void server_process_syslog_message(
assert(buf);
orig = buf;
- syslog_parse_priority((char**) &buf, &priority, true);
+ syslog_parse_priority(&buf, &priority, true);
if (s->forward_to_syslog)
forward_syslog_raw(s, priority, orig, ucred, tv);
diff --git a/src/journal/journald-syslog.h b/src/journal/journald-syslog.h
index 8ccdb77..057ea79 100644
--- a/src/journal/journald-syslog.h
+++ b/src/journal/journald-syslog.h
@@ -25,7 +25,7 @@
int syslog_fixup_facility(int priority) _const_;
-void syslog_parse_priority(char **p, int *priority, bool with_facility);
+void syslog_parse_priority(const char **p, int *priority, bool with_facility);
size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid);
void server_forward_syslog(Server *s, int priority, const char *identifier, const char *message, struct ucred *ucred, struct timeval *tv);

View File

@ -0,0 +1,77 @@
From 9b618fb2369046434ced28fe1420d8d5c75cd46e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 10 Dec 2013 21:52:11 -0500
Subject: [PATCH] activate: clean up inherited descriptors
> [simon@troela server]$ /usr/lib/systemd/systemd-activate -l 9000 main.js
> Assertion 'fd == 3 + count' failed at src/activate/activate.c:115,
> function open_sockets(). Aborting.
> Aborted (core dumped)
> after a bit debuging i found the problem:
> slim appears to leak an fd into all of its children:
> stat /proc/14004/fd/3 (14004 is the pid a random process in my session)
> File: '/proc/14004/fd/3' -> '/var/log/slim.log'
systemd-activate should be robust against the shell (or anything else) leaking
descriptors. Now everything except stdin/stdout/stderr and received sockets
will be closed.
---
src/activate/activate.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/activate/activate.c b/src/activate/activate.c
index a9461bc..6aa8b9f 100644
--- a/src/activate/activate.c
+++ b/src/activate/activate.c
@@ -137,6 +137,17 @@ static int open_sockets(int *epoll_fd, bool accept) {
count ++;
}
+ /* Close logging and all other descriptors */
+ if (arg_listen) {
+ int except[3 + n];
+
+ for (fd = 0; fd < SD_LISTEN_FDS_START + n; fd++)
+ except[fd] = fd;
+
+ log_close();
+ close_all_fds(except, 3 + n);
+ }
+
/** Note: we leak some fd's on error here. I doesn't matter
* much, since the program will exit immediately anyway, but
* would be a pain to fix.
@@ -147,6 +158,7 @@ static int open_sockets(int *epoll_fd, bool accept) {
fd = make_socket_fd(*address, SOCK_STREAM | (arg_accept*SOCK_CLOEXEC));
if (fd < 0) {
+ log_open();
log_error("Failed to open '%s': %s", *address, strerror(-fd));
return fd;
}
@@ -154,6 +166,9 @@ static int open_sockets(int *epoll_fd, bool accept) {
count ++;
}
+ if (arg_listen)
+ log_open();
+
*epoll_fd = epoll_create1(EPOLL_CLOEXEC);
if (*epoll_fd < 0) {
log_error("Failed to create epoll object: %m");
@@ -298,10 +313,10 @@ static void sigchld_hdl(int sig, siginfo_t *t, void *data) {
static int install_chld_handler(void) {
int r;
- struct sigaction act;
- zero(act);
- act.sa_flags = SA_SIGINFO;
- act.sa_sigaction = sigchld_hdl;
+ struct sigaction act = {
+ .sa_flags = SA_SIGINFO,
+ .sa_sigaction = sigchld_hdl,
+ };
r = sigaction(SIGCHLD, &act, 0);
if (r < 0)

View File

@ -0,0 +1,95 @@
From bb9c2f82137bb6d1a352341eb81ed2a0ac96d4cb Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 11 Dec 2013 18:38:51 +0100
Subject: [PATCH] man: explain in more detail how SYSTEMD_READY= influences
SYSTEMD_WANTS= in udev rules
https://bugzilla.redhat.com/show_bug.cgi?id=1026860
---
man/systemd.device.xml | 45 +++++++++++++++++++++++++++++++--------------
1 file changed, 31 insertions(+), 14 deletions(-)
diff --git a/man/systemd.device.xml b/man/systemd.device.xml
index 96ebe89..002b647 100644
--- a/man/systemd.device.xml
+++ b/man/systemd.device.xml
@@ -70,12 +70,15 @@
since no device-specific options may be
configured.</para>
- <para>systemd will automatically create dynamic device
- units for all kernel devices that are marked with the
- "systemd" udev tag (by default all block and network
- devices, and a few others). This may be used to define
- dependencies between devices and other
- units.</para>
+ <para>systemd will dynamically create device units for
+ all kernel devices that are marked with the "systemd"
+ udev tag (by default all block and network devices,
+ and a few others). This may be used to define
+ dependencies between devices and other units. To tag a
+ udev device use <literal>TAG+="systemd"</literal> in
+ the udev rules file, see
+ <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ for details.</para>
<para>Device units are named after the
<filename>/sys</filename> and
@@ -93,7 +96,7 @@
<para>The settings of device units may either be
configured via unit files, or directly from the udev
- database (which is recommended). The following udev
+ database (which is recommended). The following udev device
properties are understood by systemd:</para>
<variablelist class='udev-directives'>
@@ -101,16 +104,26 @@
<term><varname>SYSTEMD_WANTS=</varname></term>
<listitem><para>Adds dependencies of
type <varname>Wants</varname> from
- this unit to all listed units. This
+ the device unit to all listed units. This
may be used to activate arbitrary
- units, when a specific device becomes
+ units when a specific device becomes
available. Note that this and the
other tags are not taken into account
unless the device is tagged with the
<literal>systemd</literal> string in
the udev database, because otherwise
the device is not exposed as systemd
- unit.</para></listitem>
+ unit (see above). Note that systemd
+ will only act on
+ <varname>Wants</varname> dependencies
+ when a device first becomes active, it
+ will not act on them if they are added
+ to devices that are already
+ active. Use
+ <varname>SYSTEMD_READY=</varname> (see
+ below) to influence on which udev
+ event to trigger the device
+ dependencies.</para></listitem>
</varlistentry>
<varlistentry>
@@ -135,10 +148,14 @@
device disappears from the udev
tree. This option is useful to support
devices that initially show up in an
- uninitialized state in the tree, and for
- which a changed event is generated the
- moment they are fully set
- up.</para></listitem>
+ uninitialized state in the tree, and
+ for which a <literal>changed</literal>
+ event is generated the moment they are
+ fully set up. Note that
+ <varname>SYSTEMD_WANTS=</varname> (see
+ above) is not acted on as long as
+ <varname>SYSTEMD_READY=0</varname> is
+ set for a device.</para></listitem>
</varlistentry>
<varlistentry>

View File

@ -0,0 +1,36 @@
From 3fa582ff9d4bea413a7a0e301b7dbca6b33382b0 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 11 Dec 2013 23:31:34 +0100
Subject: [PATCH] units: don't run readahead done timers in containers
We don't run the collector in the container either, hence we don't need
to stop it either.
---
units/systemd-readahead-done.service.in | 1 +
units/systemd-readahead-done.timer | 1 +
2 files changed, 2 insertions(+)
diff --git a/units/systemd-readahead-done.service.in b/units/systemd-readahead-done.service.in
index c3b2ac5..e0d9579 100644
--- a/units/systemd-readahead-done.service.in
+++ b/units/systemd-readahead-done.service.in
@@ -12,6 +12,7 @@ DefaultDependencies=no
Conflicts=shutdown.target
After=default.target
Before=shutdown.target
+ConditionVirtualization=no
[Service]
Type=oneshot
diff --git a/units/systemd-readahead-done.timer b/units/systemd-readahead-done.timer
index 41bfb2b..a9f6278 100644
--- a/units/systemd-readahead-done.timer
+++ b/units/systemd-readahead-done.timer
@@ -12,6 +12,7 @@ DefaultDependencies=no
Conflicts=shutdown.target
After=default.target
Before=shutdown.target
+ConditionVirtualization=no
[Timer]
OnActiveSec=30s

View File

@ -0,0 +1,37 @@
From 622dfd7a6553cc27b6f75653481dd8808f717c49 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Thu, 12 Dec 2013 00:06:30 +0100
Subject: [PATCH] test-fileio: replace mktemp with mkstemp to avoid warnings
This is a fairly useless thing to do but it makes the compilers
and analyzers shut up about the use of mktemp.
---
src/test/test-fileio.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index 06f3e28..b005f3b 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -41,7 +41,9 @@ static void test_parse_env_file(void) {
char **i;
unsigned k;
- assert_se(mktemp(p));
+ fd = mkstemp(p);
+ assert_se(fd >= 0);
+ close(fd);
fd = mkostemp(t, O_CLOEXEC);
assert_se(fd >= 0);
@@ -152,7 +154,9 @@ static void test_parse_multiline_env_file(void) {
_cleanup_strv_free_ char **a = NULL, **b = NULL;
char **i;
- assert_se(mktemp(p));
+ fd = mkstemp(p);
+ assert_se(fd >= 0);
+ close(fd);
fd = mkostemp(t, O_CLOEXEC);
assert_se(fd >= 0);

View File

@ -0,0 +1,45 @@
From 59f2f4cfd399275c3da061212fc25636ee72367f Mon Sep 17 00:00:00 2001
From: Djalal Harouni <tixxdz@opendz.org>
Date: Thu, 12 Dec 2013 00:22:48 +0100
Subject: [PATCH] journal: pipe journalctl help output into a pager
journalctl help output might run off the screen, so be consistent
as other systemd tools do and pipe it into a pager.
---
src/journal/journalctl.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index a5c4779..71e28b0 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -114,8 +114,18 @@ typedef struct boot_id_t {
uint64_t last;
} boot_id_t;
+static void pager_open_if_enabled(void) {
+
+ if (arg_no_pager)
+ return;
+
+ pager_open(arg_pager_end);
+}
+
static int help(void) {
+ pager_open_if_enabled();
+
printf("%s [OPTIONS...] [MATCHES...]\n\n"
"Query the journal.\n\n"
"Flags:\n"
@@ -1635,8 +1645,8 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
- if (!arg_no_pager && !arg_follow)
- pager_open(arg_pager_end);
+ if (!arg_follow)
+ pager_open_if_enabled();
if (!arg_quiet) {
usec_t start, end;

View File

@ -0,0 +1,63 @@
From bedb539662380d6a120db1e8dbb63b55d2ecac2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 11 Dec 2013 22:00:33 -0500
Subject: [PATCH] nspawn: complain and continue if machine has same id
If --link-journal=host or --link-journal=guest is used, this totally
cannot work and we exit with an error. If however --link-journal=auto
or --link-journal=no is used, just display a warning.
Having the same machine id can happen if booting from the same
filesystem as the host. Since other things mostly function correctly,
let's allow that.
https://bugs.freedesktop.org/show_bug.cgi?id=68369
---
src/nspawn/nspawn.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 7346253..618f9c3 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -811,14 +811,11 @@ static int setup_hostname(void) {
}
static int setup_journal(const char *directory) {
- sd_id128_t machine_id;
+ sd_id128_t machine_id, this_id;
_cleanup_free_ char *p = NULL, *b = NULL, *q = NULL, *d = NULL;
char *id;
int r;
- if (arg_link_journal == LINK_NO)
- return 0;
-
p = strappend(directory, "/etc/machine-id");
if (!p)
return log_oom();
@@ -842,6 +839,24 @@ static int setup_journal(const char *directory) {
return r;
}
+ r = sd_id128_get_machine(&this_id);
+ if (r < 0) {
+ log_error("Failed to retrieve machine ID: %s", strerror(-r));
+ return r;
+ }
+
+ if (sd_id128_equal(machine_id, this_id)) {
+ log_full(arg_link_journal == LINK_AUTO ? LOG_WARNING : LOG_ERR,
+ "Host and machine ids are equal (%s): refusing to link journals", id);
+ if (arg_link_journal == LINK_AUTO)
+ return 0;
+ return
+ -EEXIST;
+ }
+
+ if (arg_link_journal == LINK_NO)
+ return 0;
+
free(p);
p = strappend("/var/log/journal/", id);
q = strjoin(directory, "/var/log/journal/", id, NULL);

View File

@ -0,0 +1,150 @@
From a6ba849c002fc991a290d2792573a9145f02aaf6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 14 Dec 2013 17:21:55 -0500
Subject: [PATCH] man: beef up ExecStart description
We have lots of questions from people who assume that shell syntax works
here, so let's be very explicit what is allowed and what is not. A few
examples should also help.
http://bugs.debian.org/732156
---
man/systemd.service.xml | 97 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 80 insertions(+), 17 deletions(-)
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 3f31c11..ca297ba 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -305,9 +305,10 @@
<term><varname>ExecStart=</varname></term>
<listitem><para>Commands with their
arguments that are executed when this
- service is started. The first
- argument must be an absolute path
- name.</para>
+ service is started. For each of the
+ specified commands, the first argument
+ must be an absolute and literal path
+ to an executable.</para>
<para>When <varname>Type</varname> is
not <option>oneshot</option>, only one
@@ -332,6 +333,35 @@
prior assignments of this option will
have no effect.</para>
+ <para>Each command line is split on
+ whitespace, with the first item being
+ the command to execute, and the
+ subsequent items being the arguments.
+ Double quotes ("...") and single
+ quotes ('...') may be used, in which
+ case everything until the next
+ matching quote becomes part of the
+ same argument. Quotes themselves are
+ removed after parsing. In addition, a
+ trailing backslash
+ (<literal>\</literal>) may be used to
+ merge lines. This syntax is intended
+ to be very similar to shell syntax,
+ but only the meta-characters and
+ expansions described in the following
+ paragraphs are understood.
+ Specifically, redirection using
+ <literal>&lt;</literal>,
+ <literal>&lt;&lt;</literal>,
+ <literal>&gt;</literal>, and
+ <literal>&gt;&gt;</literal>, pipes
+ using <literal>|</literal>, and
+ running programs in the background
+ using <literal>&amp;</literal>
+ and <emphasis>other elements of shell
+ syntax are not supported</emphasis>.
+ </para>
+
<para>If more than one command is
specified, the commands are invoked
one by one sequentially in the order
@@ -350,10 +380,11 @@
<para>The command line accepts
<literal>%</literal> specifiers as
described in
- <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Note
- that the first argument of the command
- line (i.e. the program to execute) may
- not include specifiers.</para>
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+ Note that the first argument of the
+ command line (i.e. the program to
+ execute) may not include
+ specifiers.</para>
<para>Basic environment variable
substitution is supported. Use
@@ -372,9 +403,7 @@
more arguments. To pass literal dollar sign
use <literal>$$</literal>. Note that the first
argument (i.e. the program to execute)
- may not be a variable, since it must
- be a literal and absolute path
- name.</para>
+ may not be a variable.</para>
<para>Optionally, if the absolute file
name is prefixed with
@@ -402,13 +431,47 @@
<programlisting>ExecStart=/bin/sh -c 'dmesg | tac'
</programlisting>
- <para>For services run by a user
- instance of systemd the special
- environment variable
- <varname>$MANAGERPID</varname> is set
- to the PID of the systemd
- instance.</para>
- </listitem>
+ <para>Only select environment variables
+ are set for executed commands. See
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+ </para>
+
+ <para>Example:</para>
+ <programlisting>ExecStart=/bin/echo one ; /bin/echo "two two"
+ </programlisting>
+ <para>This will execute
+ <command>/bin/echo</command> two
+ times, each time with one argument,
+ <literal>one</literal> and
+ <literal>two two</literal>,
+ respectively. Since two commands are
+ specified
+ <varname>Type=oneshot</varname> must
+ be used.</para>
+
+ <para>Example:</para>
+ <programlisting>ExecStart=/bin/echo / &gt;/dev/null &amp; \; \
+/bin/ls
+ </programlisting>
+ <para>This will execute
+ <command>/bin/echo</command> with five
+ arguments: <literal>/</literal>,
+ <literal>&gt;/dev/null</literal>,
+ <literal>&amp;</literal>,
+ <literal>;</literal>, and
+ <literal>/bin/ls</literal>.</para>
+
+ <para>Example:</para>
+ <programlisting>Environment="ONE=one" 'TWO=two two'
+ExecStart=/bin/echo $ONE $TWO ${TWO}
+ </programlisting>
+ <para>This will execute
+ <command>/bin/echo</command> with four
+ arguments: <literal>one</literal>,
+ <literal>two</literal>,
+ <literal>two</literal>, and
+ <literal>two two</literal>.</para>
+ </listitem>
</varlistentry>
<varlistentry>

View File

@ -0,0 +1,53 @@
From 7c6c28dca3b75b7d0c2d067752ed917b113d90d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 14 Dec 2013 17:30:25 -0500
Subject: [PATCH] man: remove advice to avoid setting the same var more than
once
So far the compatibility with .desktop settings hasn't been imporant
at all, and we do not want people to write convoluted unit
files.
---
man/systemd.service.xml | 6 +-----
man/systemd.unit.xml | 11 +++++++++++
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index ca297ba..8f9137c 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -321,11 +321,7 @@
(these semicolons must be passed as
separate words). Alternatively, this
directive may be specified more than
- once with the same effect. However,
- the latter syntax is not recommended
- for compatibility with parsers
- suitable for XDG
- <filename>.desktop</filename> files.
+ once with the same effect.
Lone semicolons may be escaped as
<literal>\;</literal>. If the empty
string is assigned to this option, the
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 029392c..77127ff 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -120,6 +120,17 @@
<citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
+ <para>Various settings are allowed to be specified
+ more than once, in which case the interpretation
+ depends on the setting. Often, multiple settings form
+ a list, and setting to an empty value "resets", which
+ means that previous assignments are ignored. When this
+ is allowed, it is mentioned in the description of the
+ setting. Note that using multiple assignments to the
+ same value makes the unit file incompatible with
+ parsers for the XDG <filename>.desktop</filename> file
+ format.</para>
+
<para>Unit files are loaded from a set of paths
determined during compilation, described in the next section.
</para>

View File

@ -0,0 +1,23 @@
From c818ae0c9288afac78a1761de3bd65007448558a Mon Sep 17 00:00:00 2001
From: Djalal Harouni <tixxdz@opendz.org>
Date: Sun, 15 Dec 2013 00:05:38 +0100
Subject: [PATCH] systemctl: add the --plain option to the help message
---
src/systemctl/systemctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index db584b2..bc9808a 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4748,7 +4748,8 @@ static int systemctl_help(void) {
" --root=PATH Enable unit files in the specified root directory\n"
" -n --lines=INTEGER Number of journal entries to show\n"
" -o --output=STRING Change journal output mode (short, short-monotonic,\n"
- " verbose, export, json, json-pretty, json-sse, cat)\n\n"
+ " verbose, export, json, json-pretty, json-sse, cat)\n"
+ " --plain Print unit dependencies as a list instead of a tree\n\n"
"Unit Commands:\n"
" list-units List loaded units\n"
" list-sockets List loaded sockets ordered by address\n"

View File

@ -0,0 +1,67 @@
From 010d6c4909ed75c247ff91a555c7942f9c2ce1c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 15 Dec 2013 16:25:04 -0500
Subject: [PATCH] Fix a few resource leaks in error paths
https://bugzilla.redhat.com/show_bug.cgi?id=1043304
Conflicts:
src/libsystemd-bus/bus-objects.c
src/udev/net/link-config.c
---
src/sleep/sleep.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index a56ab89..f96987f 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -57,15 +57,14 @@ static int write_mode(char **modes) {
return r;
}
-static int write_state(FILE *f0, char **states) {
- FILE _cleanup_fclose_ *f = f0;
+static int write_state(FILE **f, char **states) {
char **state;
int r = 0;
STRV_FOREACH(state, states) {
int k;
- k = write_string_to_file(f, *state);
+ k = write_string_to_file(*f, *state);
if (k == 0)
return 0;
log_debug("Failed to write '%s' to /sys/power/state: %s",
@@ -73,9 +72,9 @@ static int write_state(FILE *f0, char **states) {
if (r == 0)
r = k;
- fclose(f);
- f = fopen("/sys/power/state", "we");
- if (!f) {
+ fclose(*f);
+ *f = fopen("/sys/power/state", "we");
+ if (!*f) {
log_error("Failed to open /sys/power/state: %m");
return -errno;
}
@@ -87,7 +86,7 @@ static int write_state(FILE *f0, char **states) {
static int execute(char **modes, char **states) {
char* arguments[4];
int r;
- FILE *f;
+ _cleanup_fclose_ FILE *f = NULL;
const char* note = strappenda("SLEEP=", arg_verb);
/* This file is opened first, so that if we hit an error,
@@ -115,7 +114,7 @@ static int execute(char **modes, char **states) {
note,
NULL);
- r = write_state(f, states);
+ r = write_state(&f, states);
if (r < 0)
return r;

View File

@ -0,0 +1,81 @@
From dca7710c31218a2292c8e3987d1e906b27bed4e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 15 Dec 2013 16:26:27 -0500
Subject: [PATCH] Fix a few signed/unsigned format string issues
Since numbers involved are all small, behaviour was correct already.
https://bugzilla.redhat.com/show_bug.cgi?id=1043304
---
src/shared/time-util.c | 2 +-
src/udev/udev-builtin-net_id.c | 21 +++++++--------------
2 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/src/shared/time-util.c b/src/shared/time-util.c
index 81d4ede..d31401b 100644
--- a/src/shared/time-util.c
+++ b/src/shared/time-util.c
@@ -382,7 +382,7 @@ void dual_timestamp_deserialize(const char *value, dual_timestamp *t) {
assert(value);
assert(t);
- if (sscanf(value, "%lli %llu", &a, &b) != 2)
+ if (sscanf(value, "%llu %llu", &a, &b) != 2)
log_debug("Failed to parse finish timestamp value %s", value);
else {
t->realtime = a;
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index 9ae8f08..9bc1946 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -166,23 +166,17 @@ out:
static int dev_pci_slot(struct udev_device *dev, struct netnames *names) {
struct udev *udev = udev_device_get_udev(names->pcidev);
- unsigned int domain;
- unsigned int bus;
- unsigned int slot;
- unsigned int func;
- unsigned int dev_id = 0;
+ unsigned domain, bus, slot, func, dev_id = 0;
size_t l;
char *s;
const char *attr;
struct udev_device *pci = NULL;
- char slots[256];
- DIR *dir;
+ char slots[256], str[256];
+ _cleanup_closedir_ DIR *dir = NULL;
struct dirent *dent;
- char str[256];
- int hotplug_slot = 0;
- int err = 0;
+ int hotplug_slot = 0, err = 0;
- if (sscanf(udev_device_get_sysname(names->pcidev), "%x:%x:%x.%d", &domain, &bus, &slot, &func) != 4)
+ if (sscanf(udev_device_get_sysname(names->pcidev), "%x:%x:%x.%u", &domain, &bus, &slot, &func) != 4)
return -ENOENT;
/* kernel provided multi-device index */
@@ -239,7 +233,6 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) {
if (hotplug_slot > 0)
break;
}
- closedir(dir);
if (hotplug_slot > 0) {
s = names->pci_slot;
@@ -341,11 +334,11 @@ static int names_bcma(struct udev_device *dev, struct netnames *names) {
return -ENOENT;
/* bus num:core num */
- if (sscanf(udev_device_get_sysname(bcmadev), "bcma%*d:%d", &core) != 1)
+ if (sscanf(udev_device_get_sysname(bcmadev), "bcma%*u:%u", &core) != 1)
return -EINVAL;
/* suppress the common core == 0 */
if (core > 0)
- snprintf(names->bcma_core, sizeof(names->bcma_core), "b%d", core);
+ snprintf(names->bcma_core, sizeof(names->bcma_core), "b%u", core);
names->type = NET_BCMA;
return 0;

View File

@ -0,0 +1,60 @@
From 4a0ab3a8fd59d38dabb9a7096939d8d8e8adc62f Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 16 Dec 2013 17:04:36 +0100
Subject: [PATCH] util: try harder to increase the send/recv buffers of sockets
If we have the priviliges we will try SO_SNDBUFFORCE/SO_RCVBUFFORCE and
only fall back to SO_SNDBUF/SO_RCVBUF if that fails.
---
src/shared/util.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/shared/util.c b/src/shared/util.c
index 02bae90..8824b9b 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -4928,15 +4928,15 @@ int fd_inc_sndbuf(int fd, size_t n) {
socklen_t l = sizeof(value);
r = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &value, &l);
- if (r >= 0 &&
- l == sizeof(value) &&
- (size_t) value >= n*2)
+ if (r >= 0 && l == sizeof(value) && (size_t) value >= n*2)
return 0;
+ /* If we have the privileges we will ignore the kernel limit. */
+
value = (int) n;
- r = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &value, sizeof(value));
- if (r < 0)
- return -errno;
+ if (setsockopt(fd, SOL_SOCKET, SO_SNDBUFFORCE, &value, sizeof(value)) < 0)
+ if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &value, sizeof(value)) < 0)
+ return -errno;
return 1;
}
@@ -4946,16 +4946,15 @@ int fd_inc_rcvbuf(int fd, size_t n) {
socklen_t l = sizeof(value);
r = getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &value, &l);
- if (r >= 0 &&
- l == sizeof(value) &&
- (size_t) value >= n*2)
+ if (r >= 0 && l == sizeof(value) && (size_t) value >= n*2)
return 0;
- value = (int) n;
- r = setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &value, sizeof(value));
- if (r < 0)
- return -errno;
+ /* If we have the privileges we will ignore the kernel limit. */
+ value = (int) n;
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUFFORCE, &value, sizeof(value)) < 0)
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &value, sizeof(value)) < 0)
+ return -errno;
return 1;
}

View File

@ -0,0 +1,32 @@
From 8d872d28194f58da2311ca88072084458dc2eb15 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 16 Dec 2013 20:00:09 +0100
Subject: [PATCH] execute: also set SO_SNDBUF when spawning a service with
stdout/stderr connected to journald
---
src/core/execute.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/core/execute.c b/src/core/execute.c
index 58be72a..9b85379 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -75,6 +75,8 @@
/* This assumes there is a 'tty' group */
#define TTY_MODE 0620
+#define SNDBUF_SIZE (8*1024*1024)
+
static int shift_fds(int fds[], unsigned n_fds) {
int start, restart_from;
@@ -232,6 +234,8 @@ static int connect_logger_as(const ExecContext *context, ExecOutput output, cons
return -errno;
}
+ fd_inc_sndbuf(fd, SNDBUF_SIZE);
+
dprintf(fd,
"%s\n"
"%s\n"

View File

@ -0,0 +1,23 @@
From a25fd0d4bd3cf652e55c24e7dc873fe530fa111a Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Mon, 16 Dec 2013 23:35:30 +0100
Subject: [PATCH] journal-file: protect against alloca(0)
---
src/journal/journal-file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 090cf97..8ea258b 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -2737,7 +2737,8 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
ts.realtime = le64toh(o->entry.realtime);
n = journal_file_entry_n_items(o);
- items = alloca(sizeof(EntryItem) * n);
+ /* alloca() can't take 0, hence let's allocate at least one */
+ items = alloca(sizeof(EntryItem) * MAX(1u, n));
for (i = 0; i < n; i++) {
uint64_t l, h;

View File

@ -0,0 +1,42 @@
From 2d46a006393fe823e119a14794a931bd9bc25f74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 16 Dec 2013 23:40:00 -0500
Subject: [PATCH] man: describe journalctl --show-cursor
---
man/journalctl.xml | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/man/journalctl.xml b/man/journalctl.xml
index c0cc96d..d936933 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -576,11 +576,23 @@
<varlistentry>
<term><option>--after-cursor=</option></term>
- <listitem><para>Start showing entries from the
- location in the journal
- <emphasis>after</emphasis> the location
- specified by the this cursor.
- </para></listitem>
+ <listitem><para>Start showing entries
+ from the location in the journal
+ <emphasis>after</emphasis> the
+ location specified by the this cursor.
+ The cursor is shown when the
+ <option>--show-cursor</option> option
+ is used.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--show-cursor</option></term>
+
+ <listitem><para>The cursor is shown after the last
+ entry after two dashes:</para>
+ <programlisting>-- cursor: s=0639...</programlisting>
+ <para>The format of this the cursor is private
+ and subject ot change.</para></listitem>
</varlistentry>
<varlistentry>

View File

@ -0,0 +1,39 @@
From 9e32b8f531a1e15f85cce97bea931c43a9db7798 Mon Sep 17 00:00:00 2001
From: Shawn Landden <shawn@churchofgit.com>
Date: Mon, 16 Dec 2013 15:41:00 -0800
Subject: [PATCH] journal: fix against (theoretical) undefined behavior
While all the libc implementations I know return NULL when memchr's size
parameter is 0, without accessing any memory, passing NULL to memchr is
still invalid:
C11 7.24.1p2: Where an argument declared as "size_t n" specifies the length
of the array for a function, n can have the value zero on a call to that
function. Unless explicitly stated otherwise in the description of a
particular function in this subclause, pointer arguments on such a call
shall still have valid values, as described in 7.1.4. On such a call, a
function that locates a character finds no occurrence, a function that
compares two character sequences returns zero, and a function that copies
characters copies zero characters.
see http://llvm.org/bugs/show_bug.cgi?id=18247
---
src/journal/journal-file.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 8ea258b..71ef092 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1010,7 +1010,10 @@ static int journal_file_append_data(
if (r < 0)
return r;
- eq = memchr(data, '=', size);
+ if (!data)
+ eq = NULL;
+ else
+ eq = memchr(data, '=', size);
if (eq && eq > data) {
uint64_t fp;
Object *fo;

View File

@ -0,0 +1,24 @@
From 602fa0f30e4770b1f45e005a7ed9417065b0d640 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 17 Dec 2013 19:56:06 +0100
Subject: [PATCH] journald: downgrade warning message when /dev/kmsg does not
exist
---
src/journal/journald-kmsg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index 21649d0..9895808 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -382,7 +382,8 @@ int server_open_dev_kmsg(Server *s) {
s->dev_kmsg_fd = open("/dev/kmsg", O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
if (s->dev_kmsg_fd < 0) {
- log_warning("Failed to open /dev/kmsg, ignoring: %m");
+ log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
+ "Failed to open /dev/kmsg, ignoring: %m");
return 0;
}

View File

@ -0,0 +1,24 @@
From 029cd4a129832bcc750206deb05695da350efe77 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Tue, 17 Dec 2013 20:15:45 +0100
Subject: [PATCH] journal-file.c: remove redundant assignment of variable
we also do 'last_index = (uint64_t) -1;' at the end of the while
loop so there is no reason to also do it here.
---
src/journal/journal-file.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 71ef092..5ef6a2a 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1628,8 +1628,6 @@ static int generic_array_bisect(
else
left = y + 1;
}
-
- last_index = (uint64_t) -1;
}
for (;;) {

View File

@ -0,0 +1,33 @@
From 0fa446efab8593abc726a7c2438549098db4cc70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
Date: Sun, 15 Dec 2013 12:06:37 +0100
Subject: [PATCH] login: Don't stop a running user manager from
garbage-collecting the user.
With the current logic, a user will never be garbage-collected, since its
manager will always be around. Change the logic such that a user is
garbage-collected when it has no sessions and linger is disabled.
Conflicts:
src/login/logind-user.c
---
src/login/logind-user.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index adbe638..e2fce5c 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -629,12 +629,6 @@ int user_check_gc(User *u, bool drop_not_started) {
if (u->slice_job || u->service_job)
return 1;
- if (u->slice && manager_unit_is_active(u->manager, u->slice) != 0)
- return 1;
-
- if (u->service && manager_unit_is_active(u->manager, u->service) != 0)
- return 1;
-
return 0;
}

View File

@ -0,0 +1,157 @@
From 0e075f4d98a653cc0b468fc786fcd869075a75e1 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Wed, 18 Dec 2013 16:49:19 +0100
Subject: [PATCH] libudev: devices received from udev are always initialized
Conflicts:
TODO
---
src/libudev/libudev-device.c | 2 ++
src/libudev/libudev-monitor.c | 62 +++++++++++++++++++++----------------------
2 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c
index 161181a..b6c4e24 100644
--- a/src/libudev/libudev-device.c
+++ b/src/libudev/libudev-device.c
@@ -536,6 +536,8 @@ int udev_device_read_db(struct udev_device *udev_device, const char *dbfile)
udev_dbg(udev_device->udev, "no db file to read %s: %m\n", dbfile);
return -1;
}
+
+ /* devices with a database entry are initialized */
udev_device->is_initialized = true;
while (fgets(line, sizeof(line), f)) {
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index 0212792..ff89e14 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -324,9 +324,6 @@ _public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
int err = 0;
const int on = 1;
- if (udev_monitor->snl.nl.nl_family == 0)
- return -EINVAL;
-
udev_monitor_filter_update(udev_monitor);
if (!udev_monitor->bound) {
@@ -524,7 +521,6 @@ _public_ struct udev_device *udev_monitor_receive_device(struct udev_monitor *ud
char buf[8192];
ssize_t buflen;
ssize_t bufpos;
- struct udev_monitor_netlink_header *nlh;
retry:
if (udev_monitor == NULL)
@@ -536,11 +532,8 @@ retry:
smsg.msg_iovlen = 1;
smsg.msg_control = cred_msg;
smsg.msg_controllen = sizeof(cred_msg);
-
- if (udev_monitor->snl.nl.nl_family != 0) {
- smsg.msg_name = &snl;
- smsg.msg_namelen = sizeof(snl);
- }
+ smsg.msg_name = &snl;
+ smsg.msg_namelen = sizeof(snl);
buflen = recvmsg(udev_monitor->sock, &smsg, 0);
if (buflen < 0) {
@@ -554,20 +547,18 @@ retry:
return NULL;
}
- if (udev_monitor->snl.nl.nl_family != 0) {
- if (snl.nl.nl_groups == 0) {
- /* unicast message, check if we trust the sender */
- if (udev_monitor->snl_trusted_sender.nl.nl_pid == 0 ||
- snl.nl.nl_pid != udev_monitor->snl_trusted_sender.nl.nl_pid) {
- udev_dbg(udev_monitor->udev, "unicast netlink message ignored\n");
- return NULL;
- }
- } else if (snl.nl.nl_groups == UDEV_MONITOR_KERNEL) {
- if (snl.nl.nl_pid > 0) {
- udev_dbg(udev_monitor->udev, "multicast kernel netlink message from pid %d ignored\n",
- snl.nl.nl_pid);
- return NULL;
- }
+ if (snl.nl.nl_groups == 0) {
+ /* unicast message, check if we trust the sender */
+ if (udev_monitor->snl_trusted_sender.nl.nl_pid == 0 ||
+ snl.nl.nl_pid != udev_monitor->snl_trusted_sender.nl.nl_pid) {
+ udev_dbg(udev_monitor->udev, "unicast netlink message ignored\n");
+ return NULL;
+ }
+ } else if (snl.nl.nl_groups == UDEV_MONITOR_KERNEL) {
+ if (snl.nl.nl_pid > 0) {
+ udev_dbg(udev_monitor->udev, "multicast kernel netlink message from pid %d ignored\n",
+ snl.nl.nl_pid);
+ return NULL;
}
}
@@ -583,35 +574,47 @@ retry:
return NULL;
}
+ udev_device = udev_device_new(udev_monitor->udev);
+ if (udev_device == NULL)
+ return NULL;
+
if (memcmp(buf, "libudev", 8) == 0) {
+ struct udev_monitor_netlink_header *nlh;
+
/* udev message needs proper version magic */
nlh = (struct udev_monitor_netlink_header *) buf;
if (nlh->magic != htonl(UDEV_MONITOR_MAGIC)) {
udev_err(udev_monitor->udev, "unrecognized message signature (%x != %x)\n",
- nlh->magic, htonl(UDEV_MONITOR_MAGIC));
+ nlh->magic, htonl(UDEV_MONITOR_MAGIC));
+ udev_device_unref(udev_device);
return NULL;
}
- if (nlh->properties_off+32 > (size_t)buflen)
+ if (nlh->properties_off+32 > (size_t)buflen) {
+ udev_device_unref(udev_device);
return NULL;
+ }
+
bufpos = nlh->properties_off;
+
+ /* devices received from udev are always initialized */
+ udev_device_set_is_initialized(udev_device);
} else {
/* kernel message with header */
bufpos = strlen(buf) + 1;
if ((size_t)bufpos < sizeof("a@/d") || bufpos >= buflen) {
udev_dbg(udev_monitor->udev, "invalid message length\n");
+ udev_device_unref(udev_device);
return NULL;
}
/* check message header */
if (strstr(buf, "@/") == NULL) {
udev_dbg(udev_monitor->udev, "unrecognized message header\n");
+ udev_device_unref(udev_device);
return NULL;
}
}
- udev_device = udev_device_new(udev_monitor->udev);
- if (udev_device == NULL)
- return NULL;
udev_device_set_info_loaded(udev_device);
while (bufpos < buflen) {
@@ -664,9 +667,6 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor,
struct udev_list_entry *list_entry;
uint64_t tag_bloom_bits;
- if (udev_monitor->snl.nl.nl_family == 0)
- return -EINVAL;
-
blen = udev_device_get_properties_monitor_buf(udev_device, &buf);
if (blen < 32)
return -EINVAL;

View File

@ -0,0 +1,49 @@
From df5013c79d99848730abe4585dd93f77409a95c0 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 18 Dec 2013 05:07:34 +0100
Subject: [PATCH] log: don't reopen /dev/console each time we call log_open()
Instead, force reopen it only if we really really have to.
---
src/core/main.c | 1 +
src/core/shutdown.c | 1 +
src/shared/log.c | 2 --
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/main.c b/src/core/main.c
index 58c3a9e..935762f 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1347,6 +1347,7 @@ int main(int argc, char *argv[]) {
/* Running inside a container, as PID 1 */
arg_running_as = SYSTEMD_SYSTEM;
log_set_target(LOG_TARGET_CONSOLE);
+ log_close_console(); /* force reopen of /dev/console */
log_open();
/* For the later on, see above... */
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
index ea02b60..5e0f3ce 100644
--- a/src/core/shutdown.c
+++ b/src/core/shutdown.c
@@ -155,6 +155,7 @@ int main(int argc, char *argv[]) {
log_parse_environment();
log_set_target(LOG_TARGET_CONSOLE); /* syslog will die if not gone yet */
+ log_close_console(); /* force reopen of /dev/console */
log_open();
umask(0022);
diff --git a/src/shared/log.c b/src/shared/log.c
index 8f4995a..bd918fb 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -272,8 +272,6 @@ int log_open(void) {
log_close_journal();
log_close_syslog();
- /* Get the real /dev/console if we are PID=1, hence reopen */
- log_close_console();
return log_open_console();
}

View File

@ -0,0 +1,42 @@
From 21804157ff0e60508fd128310505381f7b3ec2b0 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 18 Dec 2013 16:49:15 +0100
Subject: [PATCH] log: when we log to /dev/console and got disconnected (maybe
due to vhangup) reconnect
---
src/shared/log.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/shared/log.c b/src/shared/log.c
index bd918fb..de770ca 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -335,8 +335,25 @@ static int write_to_console(
IOVEC_SET_STRING(iovec[n++], ANSI_HIGHLIGHT_OFF);
IOVEC_SET_STRING(iovec[n++], "\n");
- if (writev(console_fd, iovec, n) < 0)
- return -errno;
+ if (writev(console_fd, iovec, n) < 0) {
+
+ if (errno == EIO && getpid() == 1) {
+
+ /* If somebody tried to kick us from our
+ * console tty (via vhangup() or suchlike),
+ * try to reconnect */
+
+ log_close_console();
+ log_open_console();
+
+ if (console_fd < 0)
+ return 0;
+
+ if (writev(console_fd, iovec, n) < 0)
+ return -errno;
+ } else
+ return -errno;
+ }
return 1;
}

View File

@ -0,0 +1,23 @@
From d34a6029e4a59c75d9826e0aa57e548a86b08bba Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 18 Dec 2013 17:16:33 +0100
Subject: [PATCH] loginctl: when showing device tree of seats with no devices
show something useful
---
src/login/sysfs-show.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c
index f7d11dd..cb12ebf 100644
--- a/src/login/sysfs-show.c
+++ b/src/login/sysfs-show.c
@@ -181,6 +181,8 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) {
first = udev_enumerate_get_list_entry(e);
if (first)
show_sysfs_one(udev, seat, &first, "/", prefix, n_columns);
+ else
+ printf("%s%s%s\n", prefix, draw_special_char(DRAW_TREE_RIGHT), "(none)");
return r;
}

View File

@ -0,0 +1,52 @@
From 6bd96f28f8d67cb5cb77057e60badb4550ae35f3 Mon Sep 17 00:00:00 2001
From: "Jason St. John" <jstjohn@purdue.edu>
Date: Tue, 17 Dec 2013 18:48:43 -0500
Subject: [PATCH] man: be more explicit about option arguments that take
128-bit IDs in journalctl(1)
It may not be immediately obvious to the reader what "ID128" is, so replace the
example option argument "ID128" with "128-bit-ID".
---
man/journalctl.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/man/journalctl.xml b/man/journalctl.xml
index d936933..dced90f 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -725,7 +725,7 @@
<varlistentry>
<term><option>--list-catalog
- <optional><replaceable>ID128...</replaceable></optional>
+ <optional><replaceable>128-bit-ID...</replaceable></optional>
</option></term>
<listitem><para>List the contents of
@@ -734,7 +734,7 @@
description strings.</para>
<para>If any
- <replaceable>ID128</replaceable>s are
+ <replaceable>128-bit-ID</replaceable>s are
specified, only those entries are shown.
</para>
</listitem>
@@ -742,7 +742,7 @@
<varlistentry>
<term><option>--dump-catalog
- <optional><replaceable>ID128...</replaceable></optional>
+ <optional><replaceable>128-bit-ID...</replaceable></optional>
</option></term>
<listitem><para>Show the contents of
@@ -753,7 +753,7 @@
files.</para>
<para>If any
- <replaceable>ID128</replaceable>s are
+ <replaceable>128-bit-ID</replaceable>s are
specified, only those entries are shown.
</para>
</listitem>

View File

@ -0,0 +1,59 @@
From 1f3128aec84ea40d54423386384ad28a789cb381 Mon Sep 17 00:00:00 2001
From: "Jason St. John" <jstjohn@purdue.edu>
Date: Tue, 17 Dec 2013 19:40:02 -0500
Subject: [PATCH] man: add DOI for refereed article on Forward Secure Sealing
to journald.conf(5)
In journalctl(1), be more explicit about the reference to "Seal=" in
journald.conf(5) and what information can be found there.
---
man/journalctl.xml | 8 ++++++--
man/journald.conf.xml | 10 +++++-----
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/man/journalctl.xml b/man/journalctl.xml
index dced90f..d75c758 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -781,10 +781,14 @@
sealing key is stored in the journal
data directory and shall remain on the
host. The verification key should be
- stored externally. Also see the
+ stored externally. Refer to the
<option>Seal=</option> option in
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
- for details.</para></listitem>
+ for information on Forward Secure
+ Sealing and for a link to a refereed
+ scholarly paper detailing the
+ cryptographic theory it is based on.
+ </para></listitem>
</varlistentry>
<varlistentry>
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index 7aa2e78..8e642a3 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -130,15 +130,15 @@
by
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
<option>--setup-keys</option>
- command), forward secure sealing (FSS)
+ command), Forward Secure Sealing (FSS)
for all persistent journal files is
enabled. FSS is based on <ulink
url="https://eprint.iacr.org/2013/397">Seekable
Sequential Key Generators</ulink> by
- G. A. Marson and B. Poettering and
- may be used to protect journal files
- from unnoticed
- alteration.</para></listitem>
+ G. A. Marson and B. Poettering
+ (doi:10.1007/978-3-642-40203-6_7)
+ and may be used to protect journal files
+ from unnoticed alteration.</para></listitem>
</varlistentry>
<varlistentry>

View File

@ -0,0 +1,132 @@
From 643f82598b69d3b3002294a456a459cceb075cd3 Mon Sep 17 00:00:00 2001
From: "Jason St. John" <jstjohn@purdue.edu>
Date: Tue, 17 Dec 2013 21:36:27 -0500
Subject: [PATCH] journalctl,zsh-completion: fix several issues in --help
message text
-- fix grammar and reword some descriptions for clarity
-- add a useful description of what --follow does
-- fix the description for --after-cursor
-- properly introduce the FSS acronym for "Forward Secure Sealing" in
both sections
-- clarify the --disk-usage command
[zj: perform similar changes to zsh completions]
squash! journalctl: fix several issues in --help message text
Conflicts:
src/journal/journalctl.c
---
shell-completion/zsh/_journalctl | 14 +++++++-------
src/journal/journalctl.c | 34 +++++++++++++++++-----------------
2 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 29ff3e3..8c3dbb0 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -71,14 +71,14 @@ _arguments -s \
{-m,--merge}'[Show entries from all available journals]' \
{-b+,--boot=}'[Show data only from the specified boot or offset]:boot id or offset:_journal_boots' \
'--list-boots[List boots ordered by time]' \
- {-k,--dmesg}'[Show only kernel messages, Implies -b]' \
+ {-k,--dmesg}'[Show only kernel messages from the current boot]' \
{-u+,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \
'--user-unit=[Show data only from the specified user session unit]:units:_journal_fields USER_UNIT' \
{-p+,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \
- {-c+,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \
- '--after-cursor=[Start showing entries from the location in the journal after the cursor]:cursors:_journal_fields __CURSORS' \
- '--since=[Start showing entries newer or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \
- '--until=[Stop showing entries older or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \
+ {-c+,--cursor=}'[Start showing entries from the specified cursor]:cursors:_journal_fields __CURSORS' \
+ '--after-cursor=[Start showing entries from after the specified cursor]:cursors:_journal_fields __CURSORS' \
+ '--since=[Start showing entries on or newer than the specified date]:YYYY-MM-DD HH\:MM\:SS' \
+ '--until=[Stop showing entries on or older than the specified date]:YYYY-MM-DD HH\:MM\:SS' \
{-F,--field=}'[List all values a certain field takes]:Fields:_list_fields' \
'--system[Show system and kernel messages]' \
'--user[Show messages from user services]' \
@@ -91,8 +91,8 @@ _arguments -s \
'--list-catalog[List messages in catalog]' \
'--dump-catalog[Dump messages in catalog]' \
'--update-catalog[Update binary catalog database]' \
- '--setup-keys[Generate new FSS key pair]' \
- '--force[Force recreation of FSS keys]' \
+ '--setup-keys[Generate a new FSS key pair]' \
+ '--force[Force recreation of the FSS keys]' \
'--interval=[Time interval for changing the FSS sealing key]:time interval' \
'--verify[Verify journal file consistency]' \
'--verify-key=[Specify FSS verification key]:FSS key' \
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 71e28b0..1d66792 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -130,30 +130,30 @@ static int help(void) {
"Query the journal.\n\n"
"Flags:\n"
" --system Show only the system journal\n"
- " --user Show only the user journal for current user\n"
- " --since=DATE Start showing entries newer or of the specified date\n"
- " --until=DATE Stop showing entries older or of the specified date\n"
- " -c --cursor=CURSOR Start showing entries from specified cursor\n"
- " --after-cursor=CURSOR Start showing entries from specified cursor\n"
+ " --user Show only the user journal for the current user\n"
+ " --since=DATE Start showing entries on or newer than the specified date\n"
+ " --until=DATE Stop showing entries on or older than the specified date\n"
+ " -c --cursor=CURSOR Start showing entries from the specified cursor\n"
+ " --after-cursor=CURSOR Start showing entries from after the specified cursor\n"
" --show-cursor Print the cursor after all the entries\n"
- " -b --boot[=ID] Show data only from ID or current boot if unspecified\n"
+ " -b --boot[=ID] Show data only from ID or, if unspecified, the current boot\n"
" --list-boots Show terse information about recorded boots\n"
- " -k --dmesg Show kernel message log from current boot\n"
+ " -k --dmesg Show kernel message log from the current boot\n"
" -u --unit=UNIT Show data only from the specified unit\n"
" --user-unit=UNIT Show data only from the specified user session unit\n"
" -p --priority=RANGE Show only messages within the specified priority range\n"
" -e --pager-end Immediately jump to end of the journal in the pager\n"
- " -f --follow Follow journal\n"
+ " -f --follow Follow the journal\n"
" -n --lines[=INTEGER] Number of journal entries to show\n"
" --no-tail Show all lines, even in follow mode\n"
" -r --reverse Show the newest entries first\n"
" -o --output=STRING Change journal output mode (short, short-iso,\n"
- " short-precise, short-monotonic, verbose,\n"
- " export, json, json-pretty, json-sse, cat)\n"
+ " short-precise, short-monotonic, verbose,\n"
+ " export, json, json-pretty, json-sse, cat)\n"
" -x --catalog Add message explanations where available\n"
" -l --full Do not ellipsize fields\n"
" -a --all Show all fields, including long and unprintable\n"
- " -q --quiet Don't show privilege warning\n"
+ " -q --quiet Do not show privilege warning\n"
" --no-pager Do not pipe output into a pager\n"
" -m --merge Show entries from all available journals\n"
" -D --directory=PATH Show journal files from directory\n"
@@ -162,20 +162,20 @@ static int help(void) {
#ifdef HAVE_GCRYPT
" --interval=TIME Time interval for changing the FSS sealing key\n"
" --verify-key=KEY Specify FSS verification key\n"
- " --force Force overriding new FSS key pair with --setup-keys\n"
+ " --force Force overriding of the FSS key pair with --setup-keys\n"
#endif
"\nCommands:\n"
- " -h --help Show this help\n"
+ " -h --help Show this help text\n"
" --version Show package version\n"
- " --new-id128 Generate a new 128 Bit ID\n"
+ " --new-id128 Generate a new 128-bit ID\n"
" --header Show journal header information\n"
- " --disk-usage Show total disk usage\n"
- " -F --field=FIELD List all values a certain field takes\n"
+ " --disk-usage Show total disk usage of all journal files\n"
+ " -F --field=FIELD List all values that a specified field takes\n"
" --list-catalog Show message IDs of all entries in the message catalog\n"
" --dump-catalog Show entries in the message catalog\n"
" --update-catalog Update the message catalog database\n"
#ifdef HAVE_GCRYPT
- " --setup-keys Generate new FSS key pair\n"
+ " --setup-keys Generate a new FSS key pair\n"
" --verify Verify journal file consistency\n"
#endif
, program_invocation_short_name);

View File

@ -0,0 +1,145 @@
From 7bf8a20c2f52a3684deef37098f7a73a873da93c Mon Sep 17 00:00:00 2001
From: Martin Pitt <martinpitt@gnome.org>
Date: Thu, 19 Dec 2013 08:33:32 +0100
Subject: [PATCH] keymap: Refactor Acer tables
Move common keys into generic Acer table, and factorize the model specific
exceptions.
---
hwdb/60-keyboard.hwdb | 101 ++++++++++++++++++--------------------------------
1 file changed, 36 insertions(+), 65 deletions(-)
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index d4d948d..ab9e569 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -46,52 +46,7 @@
# Acer
##########################################
-# Acer platform kernel driver
-keyboard:name:Acer WMI hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnAcer*:pvr*
- KEYBOARD_KEY_82=f21
-
-# Aspire 5720
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5720*:pvr*
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnZG8*:pvr*
- KEYBOARD_KEY_84=bluetooth # sent when bluetooth module missing, and key pressed
- KEYBOARD_KEY_92=media # Acer arcade
- KEYBOARD_KEY_d4=bluetooth # Bluetooth on
- KEYBOARD_KEY_d9=bluetooth # Bluetooth off
- KEYBOARD_KEY_f4=prog3 # e-key
-
-# Aspire 5920g
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5920G:*
- KEYBOARD_KEY_8a=media
- KEYBOARD_KEY_92=media
- KEYBOARD_KEY_a6=setup
- KEYBOARD_KEY_b2=www
- KEYBOARD_KEY_d9=bluetooth # (toggle) on-to-off
-
-# Aspire 6920
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*6920:*
- KEYBOARD_KEY_d9=bluetooth # (toggle) on-to-off
- KEYBOARD_KEY_92=media
- KEYBOARD_KEY_9e=back
- KEYBOARD_KEY_83=rewind
- KEYBOARD_KEY_89=fastforward
-
-# Aspire 8930
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*8930:*
- KEYBOARD_KEY_ca=prog3 # key 'HOLD' on CineDash Media Console
- KEYBOARD_KEY_83=rewind
- KEYBOARD_KEY_89=fastforward
- KEYBOARD_KEY_92=media # key 'ARCADE' on CineDash Media Console
- KEYBOARD_KEY_9e=back
-
-# Travelmate C300
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*C3[01]0*:pvr*
- KEYBOARD_KEY_67=f24 # FIXME: rotate screen
- KEYBOARD_KEY_68=up
- KEYBOARD_KEY_69=down
- KEYBOARD_KEY_6b=fn
- KEYBOARD_KEY_6c=screenlock # FIXME: lock tablet device/buttons
-
-#
+# common keys
keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*
keyboard:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svneMachines:pneMachines*E725:pvr*
@@ -99,6 +54,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svneMachines:pneMachines*E725:pvr*
KEYBOARD_KEY_a6=setup # Fn+F2 Acer eSettings
KEYBOARD_KEY_a7=battery # Fn+F3 Power Management
KEYBOARD_KEY_a9=switchvideomode # Fn+F5
+ KEYBOARD_KEY_b2=www
KEYBOARD_KEY_b3=euro
KEYBOARD_KEY_b4=dollar
KEYBOARD_KEY_ce=brightnessup # Fn+Right
@@ -118,33 +74,48 @@ keyboard:dmi:bvn*:bvr*:bd*:svneMachines:pneMachines*E725:pvr*
KEYBOARD_KEY_f8=fn
KEYBOARD_KEY_f9=prog1 # Launch NTI shadow
-#
+# Acer platform kernel driver
+keyboard:name:Acer WMI hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnAcer*:pvr*
+ KEYBOARD_KEY_82=f21 # Touchpad toggle
+
+# Aspire models
+keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*:pvr*
+ KEYBOARD_KEY_84=bluetooth # sent when bluetooth module missing, and key pressed
+ KEYBOARD_KEY_d9=bluetooth # Bluetooth off
+ KEYBOARD_KEY_92=media # Acer arcade
+
+keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5720*:pvr*
+keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnZG8*:pvr*
+ KEYBOARD_KEY_f4=prog3 # e-key
+
+keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5920G:*
+ KEYBOARD_KEY_8a=media
+ KEYBOARD_KEY_a6=setup
+
+keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*6920:*
+keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*8930:*
+ KEYBOARD_KEY_ca=prog3 # key 'HOLD' on CineDash Media Console
+ KEYBOARD_KEY_83=rewind
+ KEYBOARD_KEY_89=fastforward
+ KEYBOARD_KEY_9e=back
+
+# Travelmate C300
+keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*C3[01]0*:pvr*
+ KEYBOARD_KEY_67=f24 # FIXME: rotate screen
+ KEYBOARD_KEY_68=up
+ KEYBOARD_KEY_69=down
+ KEYBOARD_KEY_6b=fn
+ KEYBOARD_KEY_6c=screenlock # FIXME: lock tablet device/buttons
+
+# on some models this isn't brightnessup
keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5210*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5220*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5610*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5620*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5720*:pvr*
- KEYBOARD_KEY_ee=screenlock
-
-#
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*6292*:pvr*
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*8471*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*4720*:pvr*
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*7720*:pvr*
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*1810T*:pvr*
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAO751h:*
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAO531h:*
- KEYBOARD_KEY_d9=bluetooth
-
-#
-keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*4720*:pvr*
- KEYBOARD_KEY_b2=www
- KEYBOARD_KEY_ee=screenlock
-
-#
keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*6593:*
keyboard:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*1640:*
- KEYBOARD_KEY_b2=www
KEYBOARD_KEY_ee=screenlock
###########################################################

View File

@ -0,0 +1,49 @@
From f1a638c065df3432bb69cc664b5425b96de13325 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 14 Dec 2013 11:54:26 -0500
Subject: [PATCH] logging: reduce send timeout to something more sensible
For a user, the timeout of 1 min per message seems equivalent to a hang.
If journald cannot process a message from PID1 for 10 ms then something
is significantly wrong. It's better to lose the message and continue.
---
src/shared/log.c | 5 ++++-
src/shared/time-util.c | 7 +++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/shared/log.c b/src/shared/log.c
index de770ca..2267764 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -126,7 +126,10 @@ static int create_log_socket(int type) {
/* We need a blocking fd here since we'd otherwise lose
messages way too early. However, let's not hang forever in the
unlikely case of a deadlock. */
- timeval_store(&tv, 1*USEC_PER_MINUTE);
+ if (getpid() == 1)
+ timeval_store(&tv, 10 * USEC_PER_MSEC);
+ else
+ timeval_store(&tv, 10 * USEC_PER_SEC);
setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
return fd;
diff --git a/src/shared/time-util.c b/src/shared/time-util.c
index d31401b..505b280 100644
--- a/src/shared/time-util.c
+++ b/src/shared/time-util.c
@@ -141,12 +141,11 @@ struct timeval *timeval_store(struct timeval *tv, usec_t u) {
if (u == (usec_t) -1) {
tv->tv_sec = (time_t) -1;
tv->tv_usec = (suseconds_t) -1;
- return tv;
+ } else {
+ tv->tv_sec = (time_t) (u / USEC_PER_SEC);
+ tv->tv_usec = (suseconds_t) (u % USEC_PER_SEC);
}
- tv->tv_sec = (time_t) (u / USEC_PER_SEC);
- tv->tv_usec = (suseconds_t) (u % USEC_PER_SEC);
-
return tv;
}

View File

@ -0,0 +1,43 @@
From e02f70c30b2ad98e5547faebd1304d5273eb0fe6 Mon Sep 17 00:00:00 2001
From: Shawn Landden <shawn@churchofgit.com>
Date: Fri, 20 Dec 2013 15:35:38 -0800
Subject: [PATCH] DEFAULT_PATH_SPLIT_USR macro
---
src/nspawn/nspawn.c | 2 +-
src/shared/path-util.h | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 618f9c3..cafc306 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1227,7 +1227,7 @@ int main(int argc, char *argv[]) {
gid_t gid = (gid_t) -1;
unsigned n_env = 2;
const char *envp[] = {
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+ "PATH=" DEFAULT_PATH_SPLIT_USR,
"container=systemd-nspawn", /* LXC sets container=lxc, so follow the scheme here */
NULL, /* TERM */
NULL, /* HOME */
diff --git a/src/shared/path-util.h b/src/shared/path-util.h
index 0a42de7..1e58e1b 100644
--- a/src/shared/path-util.h
+++ b/src/shared/path-util.h
@@ -25,10 +25,13 @@
#include "macro.h"
+#define DEFAULT_PATH_NORMAL "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
+#define DEFAULT_PATH_SPLIT_USR DEFAULT_PATH_NORMAL ":/sbin:/bin"
+
#ifdef HAVE_SPLIT_USR
-# define DEFAULT_PATH "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+# define DEFAULT_PATH DEFAULT_PATH_SPLIT_USR
#else
-# define DEFAULT_PATH "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
+# define DEFAULT_PATH DEFAULT_PATH_NORMAL
#endif
bool is_path(const char *p) _pure_;

View File

@ -0,0 +1,28 @@
From 67ab7e43a7c5623af367193817f5b562d635b0aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
Date: Sat, 21 Dec 2013 11:22:37 +0100
Subject: [PATCH] fstab-generator: Do not try to fsck non-devices
This fixes a regression introduced in 64e70e4 where the mount fails
when fstab is misconfigured with fs_passno > 0 on a virtual file
system like nfs, and the type is specified as "auto".
---
src/fstab-generator/fstab-generator.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 4137796..8c4c61c 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -153,6 +153,11 @@ static int add_fsck(FILE *f, const char *what, const char *where, const char *ty
if (passno == 0)
return 0;
+ if (!is_device_path(what)) {
+ log_warning("Checking was requested for \"%s\", but it is not a device.", what);
+ return 0;
+ }
+
if (type && !streq(type, "auto")) {
int r;
const char *checker;

View File

@ -0,0 +1,37 @@
From 45e44dd49cafc1befdc1fb6d948071520335964a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 19 Dec 2013 14:16:46 -0500
Subject: [PATCH] logind: remove dead variable
Noticed-by: Jan Alexander Steffens <jan.steffens@gmail.com>
---
src/login/logind-user.c | 3 ---
src/login/logind-user.h | 1 -
2 files changed, 4 deletions(-)
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index e2fce5c..b87311c 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -648,9 +648,6 @@ UserState user_get_state(User *u) {
assert(u);
- if (u->closing)
- return USER_CLOSING;
-
if (u->slice_job || u->service_job)
return USER_OPENING;
diff --git a/src/login/logind-user.h b/src/login/logind-user.h
index b9171d3..a36f456 100644
--- a/src/login/logind-user.h
+++ b/src/login/logind-user.h
@@ -61,7 +61,6 @@ struct User {
bool in_gc_queue:1;
bool started:1;
- bool closing:1;
LIST_HEAD(Session, sessions);
LIST_FIELDS(User, gc_queue);

4917
0191-hwdb-update.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
From 3c0667a5ed5bc7043499f176d68f77dea6bae944 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 19 Dec 2013 11:16:12 +0100
Subject: [PATCH] delta: replace readdir_r with readdir
---
src/delta/delta.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/delta/delta.c b/src/delta/delta.c
index b3272d9..fd024fc 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -280,13 +280,13 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
for (;;) {
struct dirent *de;
- union dirent_storage buf;
int k;
char *p;
- k = readdir_r(d, &buf.de, &de);
- if (k != 0)
- return -k;
+ errno = 0;
+ de = readdir(d);
+ if (!de && errno != 0)
+ return -errno;
if (!de)
break;

View File

@ -0,0 +1,375 @@
From e0902bd55deee738f3d6e33b8744364ef922caa2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 22 Dec 2013 19:45:02 -0500
Subject: [PATCH] delta: fix delta for drop-ins
Also, fix highlighting, add more debug statements, make const tables
static and global, run path_kill_slashes only at entry.
Conflicts:
src/delta/delta.c
---
src/delta/delta.c | 174 +++++++++++++++++++++++++-----------------------------
1 file changed, 79 insertions(+), 95 deletions(-)
diff --git a/src/delta/delta.c b/src/delta/delta.c
index fd024fc..e97f2e9 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -33,6 +33,34 @@
#include "build.h"
#include "strv.h"
+static const char prefixes[] =
+ "/etc\0"
+ "/run\0"
+ "/usr/local/lib\0"
+ "/usr/local/share\0"
+ "/usr/lib\0"
+ "/usr/share\0"
+#ifdef HAVE_SPLIT_USR
+ "/lib\0"
+#endif
+ ;
+
+static const char suffixes[] =
+ "sysctl.d\0"
+ "tmpfiles.d\0"
+ "modules-load.d\0"
+ "binfmt.d\0"
+ "systemd/system\0"
+ "systemd/user\0"
+ "systemd/system-preset\0"
+ "systemd/user-preset\0"
+ "udev/rules.d\0"
+ "modprobe.d\0";
+
+static const char have_dropins[] =
+ "systemd/system\0"
+ "systemd/user\0";
+
static bool arg_no_pager = false;
static int arg_diff = -1;
@@ -48,6 +76,14 @@ static enum {
(SHOW_MASKED | SHOW_EQUIVALENT | SHOW_REDIRECTED | SHOW_OVERRIDDEN | SHOW_EXTENDED)
} arg_flags = 0;
+static void pager_open_if_enabled(void) {
+
+ if (arg_no_pager)
+ return;
+
+ pager_open(false);
+}
+
static int equivalent(const char *a, const char *b) {
_cleanup_free_ char *x = NULL, *y = NULL;
@@ -76,7 +112,7 @@ static int notify_override_equivalent(const char *top, const char *bottom) {
return 0;
printf("%s%s%s %s → %s\n",
- ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight(), top, bottom);
+ ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(), top, bottom);
return 1;
}
@@ -160,24 +196,26 @@ static int found_override(const char *top, const char *bottom) {
}
static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const char *toppath, const char *drop) {
- _cleanup_free_ char *conf = NULL;
+ _cleanup_free_ char *unit = NULL;
_cleanup_free_ char *path = NULL;
_cleanup_strv_free_ char **list = NULL;
char **file;
char *c;
int r;
+ assert(!endswith(drop, "/"));
+
path = strjoin(toppath, "/", drop, NULL);
if (!path)
return -ENOMEM;
- path_kill_slashes(path);
+ log_debug("Looking at %s", path);
- conf = strdup(drop);
- if (!conf)
+ unit = strdup(drop);
+ if (!unit)
return -ENOMEM;
- c = strrchr(conf, '.');
+ c = strrchr(unit, '.');
if (!c)
return -EINVAL;
*c = 0;
@@ -200,35 +238,21 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
p = strjoin(path, "/", *file, NULL);
if (!p)
return -ENOMEM;
+ d = p + strlen(toppath) + 1;
- path_kill_slashes(p);
-
- d = strrchr(p, '/');
- if (!d || d == p) {
- free(p);
- return -EINVAL;
- }
- d--;
- d = strrchr(p, '/');
-
- if (!d || d == p) {
- free(p);
- return -EINVAL;
- }
-
+ log_debug("Adding at top: %s → %s", d, p);
k = hashmap_put(top, d, p);
if (k >= 0) {
p = strdup(p);
if (!p)
return -ENOMEM;
- d = strrchr(p, '/');
- d--;
- d = strrchr(p, '/');
+ d = p + strlen(toppath) + 1;
} else if (k != -EEXIST) {
free(p);
return k;
}
+ log_debug("Adding at bottom: %s → %s", d, p);
free(hashmap_remove(bottom, d));
k = hashmap_put(bottom, d, p);
if (k < 0) {
@@ -236,14 +260,14 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
return k;
}
- h = hashmap_get(drops, conf);
+ h = hashmap_get(drops, unit);
if (!h) {
h = hashmap_new(string_hash_func, string_compare_func);
if (!h)
return -ENOMEM;
- hashmap_put(drops, conf, h);
- conf = strdup(conf);
- if (!conf)
+ hashmap_put(drops, unit, h);
+ unit = strdup(unit);
+ if (!unit)
return -ENOMEM;
}
@@ -251,7 +275,8 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
if (!p)
return -ENOMEM;
- k = hashmap_put(h, path_get_file_name(p), p);
+ log_debug("Adding to drops: %s → %s → %s", unit, basename(p), p);
+ k = hashmap_put(h, basename(p), p);
if (k < 0) {
free(p);
if (k != -EEXIST)
@@ -269,12 +294,14 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
assert(drops);
assert(path);
+ log_debug("Looking at %s", path);
+
d = opendir(path);
if (!d) {
if (errno == ENOENT)
return 0;
- log_error("Failed to enumerate %s: %m", path);
+ log_error("Failed to open %s: %m", path);
return -errno;
}
@@ -285,11 +312,8 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
errno = 0;
de = readdir(d);
- if (!de && errno != 0)
- return -errno;
-
if (!de)
- break;
+ return -errno;
if (dropins && de->d_type == DT_DIR && endswith(de->d_name, ".d"))
enumerate_dir_d(top, bottom, drops, path, de->d_name);
@@ -301,9 +325,8 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
if (!p)
return -ENOMEM;
- path_kill_slashes(p);
-
- k = hashmap_put(top, path_get_file_name(p), p);
+ log_debug("Adding at top: %s → %s", basename(p), p);
+ k = hashmap_put(top, basename(p), p);
if (k >= 0) {
p = strdup(p);
if (!p)
@@ -313,44 +336,37 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
return k;
}
- free(hashmap_remove(bottom, path_get_file_name(p)));
- k = hashmap_put(bottom, path_get_file_name(p), p);
+ log_debug("Adding at bottom: %s → %s", basename(p), p);
+ free(hashmap_remove(bottom, basename(p)));
+ k = hashmap_put(bottom, basename(p), p);
if (k < 0) {
free(p);
return k;
}
}
-
- return 0;
}
-static int process_suffix(const char *prefixes, const char *suffix, bool dropins) {
+static int process_suffix(const char *suffix) {
const char *p;
char *f;
- Hashmap *top, *bottom=NULL, *drops=NULL;
+ Hashmap *top, *bottom, *drops;
Hashmap *h;
char *key;
int r = 0, k;
Iterator i, j;
int n_found = 0;
+ bool dropins;
- assert(prefixes);
assert(suffix);
+ assert(!startswith(suffix, "/"));
+ assert(!strstr(suffix, "//"));
- top = hashmap_new(string_hash_func, string_compare_func);
- if (!top) {
- r = -ENOMEM;
- goto finish;
- }
+ dropins = nulstr_contains(have_dropins, suffix);
+ top = hashmap_new(string_hash_func, string_compare_func);
bottom = hashmap_new(string_hash_func, string_compare_func);
- if (!bottom) {
- r = -ENOMEM;
- goto finish;
- }
-
drops = hashmap_new(string_hash_func, string_compare_func);
- if (!drops) {
+ if (!top || !bottom || !drops) {
r = -ENOMEM;
goto finish;
}
@@ -365,10 +381,8 @@ static int process_suffix(const char *prefixes, const char *suffix, bool dropins
}
k = enumerate_dir(top, bottom, drops, t, dropins);
- if (k < 0)
+ if (r == 0)
r = k;
-
- log_debug("Looking at %s", t);
}
HASHMAP_FOREACH_KEY(f, key, top, i) {
@@ -409,21 +423,20 @@ finish:
return r < 0 ? r : n_found;
}
-static int process_suffix_chop(const char *prefixes, const char *suffix, const char *have_dropins) {
+static int process_suffix_chop(const char *suffix) {
const char *p;
- assert(prefixes);
assert(suffix);
if (!path_is_absolute(suffix))
- return process_suffix(prefixes, suffix, nulstr_contains(have_dropins, suffix));
+ return process_suffix(suffix);
/* Strip prefix from the suffix */
NULSTR_FOREACH(p, prefixes) {
if (startswith(suffix, p)) {
suffix += strlen(p);
suffix += strspn(suffix, "/");
- return process_suffix(prefixes, suffix, nulstr_contains(have_dropins, suffix));
+ return process_suffix(suffix);
}
}
@@ -548,35 +561,6 @@ static int parse_argv(int argc, char *argv[]) {
}
int main(int argc, char *argv[]) {
-
- const char prefixes[] =
- "/etc\0"
- "/run\0"
- "/usr/local/lib\0"
- "/usr/local/share\0"
- "/usr/lib\0"
- "/usr/share\0"
-#ifdef HAVE_SPLIT_USR
- "/lib\0"
-#endif
- ;
-
- const char suffixes[] =
- "sysctl.d\0"
- "tmpfiles.d\0"
- "modules-load.d\0"
- "binfmt.d\0"
- "systemd/system\0"
- "systemd/user\0"
- "systemd/system-preset\0"
- "systemd/user-preset\0"
- "udev/rules.d\0"
- "modprobe.d\0";
-
- const char have_dropins[] =
- "systemd/system\0"
- "systemd/user\0";
-
int r = 0, k;
int n_found = 0;
@@ -595,14 +579,14 @@ int main(int argc, char *argv[]) {
else if (arg_diff)
arg_flags |= SHOW_OVERRIDDEN;
- if (!arg_no_pager)
- pager_open(false);
+ pager_open_if_enabled();
if (optind < argc) {
int i;
for (i = optind; i < argc; i++) {
- k = process_suffix_chop(prefixes, argv[i], have_dropins);
+ path_kill_slashes(argv[i]);
+ k = process_suffix_chop(argv[i]);
if (k < 0)
r = k;
else
@@ -613,7 +597,7 @@ int main(int argc, char *argv[]) {
const char *n;
NULSTR_FOREACH(n, suffixes) {
- k = process_suffix(prefixes, n, nulstr_contains(have_dropins, n));
+ k = process_suffix(n);
if (k < 0)
r = k;
else

View File

@ -0,0 +1,251 @@
From 31ce1352b687551d62d3b7d4dc1276b2dff1d65a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 22 Dec 2013 22:53:23 -0500
Subject: [PATCH] delta: if prefix is specified, only show overrides there
systemd-delta /run/systemd/system will show all unit overrides
in /run, etc.
---
man/systemd-delta.xml | 80 +++++++++++++++++++++++++++++++++++++++++----------
src/delta/delta.c | 71 ++++++++++++++++++++++++++++-----------------
2 files changed, 109 insertions(+), 42 deletions(-)
diff --git a/man/systemd-delta.xml b/man/systemd-delta.xml
index 413ebd8..4d3ab78 100644
--- a/man/systemd-delta.xml
+++ b/man/systemd-delta.xml
@@ -49,7 +49,9 @@
<refsynopsisdiv>
<cmdsynopsis>
- <command>systemd-delta <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">SUFFIX</arg></command>
+ <command>systemd-delta</command>
+ <arg choice="opt" rep="repeat">OPTIONS</arg>
+ <arg choice="opt" rep="repeat"><replaceable>PREFIX</replaceable><optional>/<replaceable>SUFFIX</replaceable></optional>|<replaceable>SUFFIX</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -57,18 +59,46 @@
<title>Description</title>
<para><command>systemd-delta</command> may be used to
- identify and compare configuration files in
- <filename>/etc</filename> that override default
- counterparts in <filename>/usr</filename>. The command
- line argument can be one or more name of a subdirectories of
- <filename>/etc</filename> or
- <filename>/usr/lib</filename> to compare, such as
- <filename>tmpfiles.d</filename>, <filename>sysctl.d</filename> or
- <filename>systemd/system</filename>.</para>
-
- <para>When no argument is specified a number of
- well-known subdirectories are searched for overridden
- files.</para>
+ identify and compare configuration files that override
+ other configuration files. Files in
+ <filename>/etc</filename> have highest priority, files
+ in <filename>/run</filename> have the second highest
+ priority, ..., files in <filename>/lib</filename> have
+ lowest priority. Files in a directory with higher
+ priority override files with the same name in
+ directories of lower priority. In addition, certain
+ configuration files can have <literal>.d</literal>
+ directories which contain "drop-in" files with
+ configuration snippets which augment the main
+ configuration file. "Drop-in" files can be overriden
+ in the same way by placing files with the same name in
+ a directory of higher priority (except that in case of
+ "drop-in" files, both the "drop-in" file name and the
+ name of the containing directory, which corresponds to
+ the name of the main configuration file, must match).
+ For a fuller explanation, see
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+ </para>
+
+ <para>The command line argument will be split into a
+ prefix and a suffix. Either is optional. The prefix
+ must be one of the directories containing
+ configuration files (<filename>/etc</filename>,
+ <filename>/run</filename>,
+ <filename>/usr/lib</filename>, ...). If it is given,
+ only overriding files contained in this directory will
+ be shown. Otherwise, all overriding files will be
+ shown. The suffix must be a name of a subdirectory
+ containing configuration files like
+ <filename>tmpfiles.d</filename>,
+ <filename>sysctl.d</filename> or
+ <filename>systemd/system</filename>. If it is given,
+ only configuration files in this subdirectory (across
+ all configuration paths) will be analyzed. Otherwise,
+ all configuration files will be analyzed. If the
+ commandline argument is not given at all, all
+ configuration files will be analyzed. See below for
+ some examples.</para>
</refsect1>
<refsect1>
@@ -168,9 +198,28 @@
</varlistentry>
</variablelist>
-
</refsect1>
+ <refsect1>
+ <title>Examples</title>
+
+ <para>To see all local configuration:</para>
+ <programlisting>systemd-delta
+ </programlisting>
+
+ <para>To see all runtime configuration:</para>
+ <programlisting>systemd-delta /run
+ </programlisting>
+
+ <para>To see all system unit configuration changes:</para>
+ <programlisting>systemd-delta systemd/system
+ </programlisting>
+
+ <para>To see all runtime "drop-in" changes for system units:</para>
+ <programlisting>systemd-delta --type=extended /run/systemd/system
+ </programlisting>
+ </refsect1>
+
<refsect1>
<title>Exit status</title>
@@ -181,7 +230,8 @@
<refsect1>
<title>See Also</title>
<para>
- <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
</para>
</refsect1>
diff --git a/src/delta/delta.c b/src/delta/delta.c
index e97f2e9..ae658f9 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -4,6 +4,7 @@
This file is part of systemd.
Copyright 2012 Lennart Poettering
+ Copyright 2013 Zbigniew Jędrzejewski-Szmek
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
@@ -346,7 +347,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
}
}
-static int process_suffix(const char *suffix) {
+static int process_suffix(const char *suffix, const char *onlyprefix) {
const char *p;
char *f;
Hashmap *top, *bottom, *drops;
@@ -391,20 +392,23 @@ static int process_suffix(const char *suffix) {
o = hashmap_get(bottom, key);
assert(o);
- if (path_equal(o, f))
- notify_override_unchanged(f);
- else {
- k = found_override(f, o);
- if (k < 0)
- r = k;
- else
- n_found += k;
+ if (!onlyprefix || startswith(o, onlyprefix)) {
+ if (path_equal(o, f)) {
+ notify_override_unchanged(f);
+ } else {
+ k = found_override(f, o);
+ if (k < 0)
+ r = k;
+ else
+ n_found += k;
+ }
}
h = hashmap_get(drops, key);
if (h)
HASHMAP_FOREACH(o, h, j)
- n_found += notify_override_extended(f, o);
+ if (!onlyprefix || startswith(o, onlyprefix))
+ n_found += notify_override_extended(f, o);
}
finish:
@@ -423,24 +427,41 @@ finish:
return r < 0 ? r : n_found;
}
-static int process_suffix_chop(const char *suffix) {
+static int process_suffixes(const char *onlyprefix) {
+ const char *n;
+ int n_found = 0, r;
+
+ NULSTR_FOREACH(n, suffixes) {
+ r = process_suffix(n, onlyprefix);
+ if (r < 0)
+ return r;
+ else
+ n_found += r;
+ }
+ return n_found;
+}
+
+static int process_suffix_chop(const char *arg) {
const char *p;
- assert(suffix);
+ assert(arg);
- if (!path_is_absolute(suffix))
- return process_suffix(suffix);
+ if (!path_is_absolute(arg))
+ return process_suffix(arg, NULL);
/* Strip prefix from the suffix */
NULSTR_FOREACH(p, prefixes) {
- if (startswith(suffix, p)) {
- suffix += strlen(p);
+ const char *suffix = startswith(arg, p);
+ if (suffix) {
suffix += strspn(suffix, "/");
- return process_suffix(suffix);
+ if (*suffix)
+ return process_suffix(suffix, NULL);
+ else
+ return process_suffixes(arg);
}
}
- log_error("Invalid suffix specification %s.", suffix);
+ log_error("Invalid suffix specification %s.", arg);
return -EINVAL;
}
@@ -594,15 +615,11 @@ int main(int argc, char *argv[]) {
}
} else {
- const char *n;
-
- NULSTR_FOREACH(n, suffixes) {
- k = process_suffix(n);
- if (k < 0)
- r = k;
- else
- n_found += k;
- }
+ k = process_suffixes(NULL);
+ if (k < 0)
+ r = k;
+ else
+ n_found += k;
}
if (r >= 0)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,401 @@
From 6972095a2b6eb919b622a89d11e0dc823ed60efb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 24 Dec 2013 10:21:45 -0500
Subject: [PATCH] man,units: tmpfiles.d(5) cleanup
Condition for /lib (necessary for split /usr) was missing from the unit.
Some changes which were done in tmpfiles.d(5) were not carried over to
systemd-tmpfiles(1).
Also use markup where possible.
Conflicts:
man/tmpfiles.d.xml
---
man/systemd-tmpfiles.xml | 53 ++++++----
man/tmpfiles.d.xml | 168 +++++++++++++++++++-------------
units/systemd-tmpfiles-setup.service.in | 1 +
3 files changed, 134 insertions(+), 88 deletions(-)
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
index ba727e1..91c0372 100644
--- a/man/systemd-tmpfiles.xml
+++ b/man/systemd-tmpfiles.xml
@@ -54,7 +54,9 @@
<refsynopsisdiv>
<cmdsynopsis>
- <command>systemd-tmpfiles <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">CONFIGURATION FILE</arg></command>
+ <command>systemd-tmpfiles</command>
+ <arg choice="opt" rep="repeat">OPTIONS</arg>
+ <arg choice="opt" rep="repeat"><replaceable>CONFIGFILE</replaceable></arg>
</cmdsynopsis>
<para><filename>systemd-tmpfiles-setup.service</filename></para>
@@ -67,22 +69,20 @@
<title>Description</title>
<para><command>systemd-tmpfiles</command> creates,
- deletes and cleans up volatile and temporary files and
+ deletes, and cleans up volatile and temporary files and
directories, based on the configuration file format and
- location specified in <citerefentry>
- <refentrytitle>tmpfiles.d</refentrytitle>
- <manvolnum>5</manvolnum>
- </citerefentry>.</para>
+ location specified in
+ <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+ </para>
<para>If invoked with no arguments, it applies all
directives from all configuration files. If one or
more filenames are passed on the command line, only
the directives in these files are applied. If only
the basename of a configuration file is specified,
- all configuration directories as specified in <citerefentry>
- <refentrytitle>tmpfiles.d</refentrytitle>
- <manvolnum>5</manvolnum>
- </citerefentry> are searched for a matching file.</para>
+ all configuration directories as specified in
+ <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ are searched for a matching file.</para>
</refsect1>
<refsect1>
@@ -94,12 +94,25 @@
<varlistentry>
<term><option>--create</option></term>
- <listitem><para>If this option is passed, all
- files and directories marked with f,
- F, d, D in the configuration files are
- created. Files and directories marked with z,
- Z have their ownership, access mode and security
- labels set.</para></listitem>
+ <listitem><para>If this option is
+ passed, all files and directories
+ marked with <varname>f</varname>,
+ <varname>F</varname>,
+ <varname>w</varname>,
+ <varname>d</varname>,
+ <varname>D</varname>,
+ <varname>p</varname>,
+ <varname>L</varname>,
+ <varname>c</varname>,
+ <varname>b</varname>,
+ <varname>m</varname> in the
+ configuration files are created or
+ written to. Files and directories
+ marked with <varname>z</varname>,
+ <varname>Z</varname>,
+ <varname>m</varname> have their
+ ownership, access mode and security
+ labels set. </para></listitem>
</varlistentry>
<varlistentry>
@@ -113,9 +126,11 @@
<varlistentry>
<term><option>--remove</option></term>
<listitem><para>If this option is
- passed, all files and directories marked
- with r, R in the configuration files
- are removed.</para></listitem>
+ passed, all files and directories
+ marked with <varname>r</varname>,
+ <varname>R</varname> in the
+ configuration files are
+ removed.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--prefix=PATH</option></term>
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index e8b630d..a00637b 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -67,23 +67,32 @@
<title>Configuration Format</title>
<para>Each configuration file shall be named in the
- style of <filename>&lt;package&gt;.conf</filename>.
- Files in <filename>/etc/</filename> override files
- with the same name in <filename>/usr/lib/</filename>
- and <filename>/run/</filename>. Files in
- <filename>/run/</filename> override files with the same
- name in <filename>/usr/lib/</filename>. Packages
+ style of
+ <filename><replaceable>package</replaceable>.conf</filename>
+ or
+ <filename><replaceable>package</replaceable>-<replaceable>part</replaceable>.conf</filename>.
+ The second variant should be used when it is desirable
+ to make it easy to override just this part of
+ configuration.</para>
+
+ <para>Files in <filename>/etc/tmpfiles.d</filename>
+ override files with the same name in
+ <filename>/usr/lib/tmpfiles.d</filename> and
+ <filename>/run/tmpfiles.d</filename>. Files in
+ <filename>/run/tmpfiles.d</filename> override files
+ with the same name in
+ <filename>/usr/lib/tmpfiles.d</filename>. Packages
should install their configuration files in
- <filename>/usr/lib/</filename>. Files in
- <filename>/etc/</filename> are reserved for the local
- administrator, who may use this logic to override the
- configuration files installed by vendor packages. All
- configuration files are sorted by their filename in
- lexicographic order, regardless in which of the
- directories they reside. If multiple files specify the
- same path, the entry in the file with the lexicographically
- earliest name will be applied, all all other conflicting
- entries logged as errors.</para>
+ <filename>/usr/lib/tmpfiles.d</filename>. Files in
+ <filename>/etc/tmpfiles.d</filename> are reserved for
+ the local administrator, who may use this logic to
+ override the configuration files installed by vendor
+ packages. All configuration files are sorted by their
+ filename in lexicographic order, regardless in which
+ of the directories they reside. If multiple files
+ specify the same path, the entry in the file with the
+ lexicographically earliest name will be applied, all
+ all other conflicting entries logged as errors.</para>
<para>If the administrator wants to disable a
configuration file supplied by the vendor, the
@@ -93,10 +102,10 @@
same filename.</para>
<para>The configuration format is one line per path
- containing action, path, mode, ownership, age and argument
+ containing type, path, mode, ownership, age, and argument
fields:</para>
- <programlisting>Type Path Mode UID GID Age Argument
+ <programlisting>#Type Path Mode UID GID Age Argument
d /run/user 0755 root root 10d -
L /tmp/foobar - - - - /dev/null</programlisting>
@@ -109,12 +118,12 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<variablelist>
<varlistentry>
<term><varname>f</varname></term>
- <listitem><para>Create a file if it does not exist yet (optionally writing a short string into it, if the argument parameter is passed)</para></listitem>
+ <listitem><para>Create a file if it does not exist yet. If the argument parameter is given, it will be written to the file.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>F</varname></term>
- <listitem><para>Create or truncate a file (optionally writing a short string into it, if the argument parameter is passed)</para></listitem>
+ <listitem><para>Create or truncate a file. If the argument parameter is given, it will be written to the file.</para></listitem>
</varlistentry>
<varlistentry>
@@ -127,32 +136,32 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<varlistentry>
<term><varname>d</varname></term>
- <listitem><para>Create a directory if it does not exist yet</para></listitem>
+ <listitem><para>Create a directory if it does not exist yet.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>D</varname></term>
- <listitem><para>Create or empty a directory</para></listitem>
+ <listitem><para>Create or empty a directory.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>p</varname></term>
- <listitem><para>Create a named pipe (FIFO) if it does not exist yet</para></listitem>
+ <listitem><para>Create a named pipe (FIFO) if it does not exist yet.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>L</varname></term>
- <listitem><para>Create a symlink if it does not exist yet</para></listitem>
+ <listitem><para>Create a symlink if it does not exist yet.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>c</varname></term>
- <listitem><para>Create a character device node if it does not exist yet</para></listitem>
+ <listitem><para>Create a character device node if it does not exist yet.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>b</varname></term>
- <listitem><para>Create a block device node if it does not exist yet</para></listitem>
+ <listitem><para>Create a block device node if it does not exist yet.</para></listitem>
</varlistentry>
<varlistentry>
@@ -174,11 +183,12 @@ L /tmp/foobar - - - - /dev/null</programlisting>
as controlled with the Age
parameter. Note that lines of
this type do not influence the
- effect of r or R lines. Lines
- of this type accept
+ effect of <varname>r</varname>
+ or <varname>R</varname> lines.
+ Lines of this type accept
shell-style globs in place of
- normal path
- names.</para></listitem>
+ normal path names.
+ </para></listitem>
</varlistentry>
<varlistentry>
@@ -187,28 +197,31 @@ L /tmp/foobar - - - - /dev/null</programlisting>
during cleaning. Use this type
to exclude paths from clean-up
as controlled with the Age
- parameter. Unlike x this
+ parameter. Unlike
+ <varname>x</varname>, this
parameter will not exclude the
- content if path is a directory,
- but only directory itself.
- Note that lines of this type do
- not influence the effect of r
- or R lines. Lines of this type
- accept shell-style globs in
- place of normal path
- names.</para></listitem>
+ content if path is a
+ directory, but only directory
+ itself. Note that lines of
+ this type do not influence the
+ effect of <varname>r</varname>
+ or <varname>R</varname> lines.
+ Lines of this type accept
+ shell-style globs in place of
+ normal path names.
+ </para></listitem>
</varlistentry>
<varlistentry>
<term><varname>r</varname></term>
<listitem><para>Remove a file
- or directory if it
- exists. This may not be used
- to remove non-empty
- directories, use R for
- that. Lines of this type
- accept shell-style globs in
- place of normal path
+ or directory if it exists.
+ This may not be used to remove
+ non-empty directories, use
+ <varname>R</varname> for that.
+ Lines of this type accept
+ shell-style globs in place of
+ normal path
names.</para></listitem>
</varlistentry>
@@ -308,11 +321,14 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<para>The file access mode to use when
creating this file or directory. If omitted or
when set to -, the default is used: 0755 for
- directories, 0644 for all other file
- objects. For z, Z lines, if omitted or when set
- to -, the file access mode will not be
- modified. This parameter is ignored for x, r,
- R, L lines.</para>
+ directories, 0644 for all other file objects.
+ For <varname>z</varname>, <varname>Z</varname>
+ lines, if omitted or when set to
+ <literal>-</literal>, the file access mode
+ will not be modified. This parameter is
+ ignored for <varname>x</varname>,
+ <varname>r</varname>, <varname>R</varname>,
+ <varname>L</varname> lines.</para>
</refsect2>
<refsect2>
@@ -321,10 +337,15 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<para>The user and group to use for this file
or directory. This may either be a numeric
user/group ID or a user or group name. If
- omitted or when set to -, the default 0 (root)
- is used. For z, Z lines, when omitted or when set to -,
- the file ownership will not be modified.
- These parameters are ignored for x, r, R, L lines.</para>
+ omitted or when set to <literal>-</literal>,
+ the default 0 (root) is used. For
+ <varname>z</varname>, <varname>Z</varname>
+ lines, when omitted or when set to -, the file
+ ownership will not be modified. These
+ parameters are ignored for
+ <varname>x</varname>, <varname>r</varname>,
+ <varname>R</varname>, <varname>L</varname>
+ lines.</para>
</refsect2>
<refsect2>
@@ -357,28 +378,37 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<para>When the age is set to zero, the files are cleaned
unconditionally.</para>
- <para>The age field only applies to lines starting with
- d, D and x. If omitted or set to -, no automatic clean-up
- is done.</para>
+ <para>The age field only applies to lines
+ starting with <varname>d</varname>,
+ <varname>D</varname>, and
+ <varname>x</varname>. If omitted or set to
+ <literal>-</literal>, no automatic clean-up is
+ done.</para>
<para>If the age field starts with a tilde
- character (~), the clean-up is only applied to
- files and directories one level inside the
- directory specified, but not the files and
- directories immediately inside it.</para>
+ character <literal>~</literal>, the clean-up
+ is only applied to files and directories one
+ level inside the directory specified, but not
+ the files and directories immediately inside
+ it.</para>
</refsect2>
<refsect2>
<title>Argument</title>
- <para>For L lines determines the destination
- path of the symlink. For c, b determines the
+ <para>For <varname>L</varname> lines
+ determines the destination path of the
+ symlink. For <varname>c</varname>,
+ <varname>b</varname> determines the
major/minor of the device node, with major and
- minor formatted as integers, separated by :,
- e.g. "1:3". For f, F, w may be used to specify
- a short string that is written to the file,
- suffixed by a newline. Ignored for all other
- lines.</para>
+ minor formatted as integers, separated by
+ <literal>:</literal>, e.g.
+ <literal>1:3</literal>. For
+ <varname>f</varname>, <varname>F</varname>,
+ and <varname>w</varname> may be used to
+ specify a short string that is written to the
+ file, suffixed by a newline. Ignored for all
+ other lines.</para>
</refsect2>
</refsect1>
diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in
index 6f98063..3405e28 100644
--- a/units/systemd-tmpfiles-setup.service.in
+++ b/units/systemd-tmpfiles-setup.service.in
@@ -14,6 +14,7 @@ Conflicts=shutdown.target
After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target
Before=sysinit.target shutdown.target
ConditionDirectoryNotEmpty=|/usr/lib/tmpfiles.d
+ConditionDirectoryNotEmpty=|/lib/tmpfiles.d
ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d
ConditionDirectoryNotEmpty=|/etc/tmpfiles.d
ConditionDirectoryNotEmpty=|/run/tmpfiles.d

View File

@ -0,0 +1,281 @@
From 66b1ee20b814b02cd0fb73fec4a2a9b11defc607 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 20 Dec 2013 20:25:39 -0500
Subject: [PATCH] tmpfiles: introduce the concept of unsafe operations
Various operations done by systemd-tmpfiles may only be safely done at
boot (e.g. removal of X lockfiles in /tmp, creation of /run/nologin).
Other operations may be done at any point in time (e.g. setting the
ownership on /{run,var}/log/journal). This distinction is largely
orthogonal to the type of operation.
A new switch --unsafe is added, and operations which should only be
executed during bootup are marked with an exclamation mark in the
configuration files. systemd-tmpfiles.service is modified to use this
switch, and guards are added so it is hard to re-start it by mistake.
If we install a new version of systemd, we actually want to enforce
some changes to tmpfiles configuration immediately. This should now be
possible to do safely, so distribution packages can be modified to
execute the "safe" subset at package installation time.
/run/nologin creation is split out into a separate service, to make it
easy to override.
https://bugzilla.redhat.com/show_bug.cgi?id=1043212
https://bugzilla.redhat.com/show_bug.cgi?id=1045849
---
Makefile.am | 1 +
man/systemd-tmpfiles.xml | 6 ++++++
man/tmpfiles.d.xml | 25 +++++++++++++++++++++++++
src/tmpfiles/tmpfiles.c | 22 +++++++++++++++++++---
tmpfiles.d/legacy.conf | 6 +++---
tmpfiles.d/systemd-nologin.conf | 11 +++++++++++
tmpfiles.d/systemd.conf | 4 +---
tmpfiles.d/x11.conf | 2 +-
units/systemd-tmpfiles-setup.service.in | 6 ++++--
9 files changed, 71 insertions(+), 12 deletions(-)
create mode 100644 tmpfiles.d/systemd-nologin.conf
diff --git a/Makefile.am b/Makefile.am
index 16a5c3c..6233a7f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1599,6 +1599,7 @@ nodist_systemunit_DATA += \
dist_tmpfiles_DATA = \
tmpfiles.d/systemd.conf \
+ tmpfiles.d/systemd-nologin.conf \
tmpfiles.d/tmp.conf \
tmpfiles.d/x11.conf
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
index 91c0372..495247e 100644
--- a/man/systemd-tmpfiles.xml
+++ b/man/systemd-tmpfiles.xml
@@ -133,6 +133,12 @@
removed.</para></listitem>
</varlistentry>
<varlistentry>
+ <term><option>--unsafe</option></term>
+ <listitem><para>Also execute lines
+ with an exclamation mark.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
<term><option>--prefix=PATH</option></term>
<listitem><para>Only apply rules that
apply to paths with the specified
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index a00637b..39aa68d 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -113,6 +113,9 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<refsect2>
<title>Type</title>
+ <para>The type consists of a single letter and
+ optionally an exclamation mark.</para>
+
<para>The following line types are understood:</para>
<variablelist>
@@ -262,6 +265,28 @@ L /tmp/foobar - - - - /dev/null</programlisting>
names.</para></listitem>
</varlistentry>
</variablelist>
+
+ <para>If the exclamation mark is used, this
+ line is only safe of execute during boot, and
+ can break a running system. Lines without the
+ exclamation mark are presumed to be safe to
+ execute at any time, e.g. on package upgrades.
+ <command>systemd-tmpfiles</command> will
+ execute line with an exclamation mark only if
+ option <option>--unsafe</option> is given.
+ </para>
+
+ <para>For example:
+ <programlisting>
+# Make sure these are created by default so that nobody else can
+d /tmp/.X11-unix 1777 root root 10d
+
+# Unlink the X11 lock files
+r! /tmp/.X[0-9]*-lock
+ </programlisting>
+ The second line in contrast to the first one
+ would break a running system, and will only be
+ executed with <option>--unsafe</option>.</para>
</refsect2>
<refsect2>
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 00f74c2..30a8a55 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -106,6 +106,7 @@ static Set *unix_sockets = NULL;
static bool arg_create = false;
static bool arg_clean = false;
static bool arg_remove = false;
+static bool arg_unsafe = false;
static char **include_prefixes = NULL;
static char **exclude_prefixes = NULL;
@@ -1073,7 +1074,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
_cleanup_item_free_ Item *i = NULL;
Item *existing;
_cleanup_free_ char
- *mode = NULL, *user = NULL, *group = NULL, *age = NULL, *path = NULL;
+ *action = NULL, *mode = NULL, *user = NULL, *group = NULL, *age = NULL, *path = NULL;
char type;
Hashmap *h;
int r, n = -1;
@@ -1083,8 +1084,8 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
assert(buffer);
r = sscanf(buffer,
- "%c %ms %ms %ms %ms %ms %n",
- &type,
+ "%ms %ms %ms %ms %ms %ms %n",
+ &action,
&path,
&mode,
&user,
@@ -1096,6 +1097,14 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
return -EIO;
}
+ if (strlen(action) > 2 || (strlen(action) > 1 && action[1] != '!')) {
+ log_error("[%s:%u] Unknown modifier '%s'", fname, line, action);
+ return -EINVAL;
+ } else if (strlen(action) > 1 && !arg_unsafe)
+ return 0;
+
+ type = action[0];
+
i = new0(Item, 1);
if (!i)
return log_oom();
@@ -1266,6 +1275,7 @@ static int help(void) {
" --create Create marked files/directories\n"
" --clean Clean up marked directories\n"
" --remove Remove marked files/directories\n"
+ " --unsafe Execute actions only safe at boot\n"
" --prefix=PATH Only apply rules that apply to paths with the specified prefix\n"
" --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n",
program_invocation_short_name);
@@ -1279,6 +1289,7 @@ static int parse_argv(int argc, char *argv[]) {
ARG_CREATE,
ARG_CLEAN,
ARG_REMOVE,
+ ARG_UNSAFE,
ARG_PREFIX,
ARG_EXCLUDE_PREFIX,
};
@@ -1288,6 +1299,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "create", no_argument, NULL, ARG_CREATE },
{ "clean", no_argument, NULL, ARG_CLEAN },
{ "remove", no_argument, NULL, ARG_REMOVE },
+ { "unsafe", no_argument, NULL, ARG_UNSAFE },
{ "prefix", required_argument, NULL, ARG_PREFIX },
{ "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX },
{ NULL, 0, NULL, 0 }
@@ -1318,6 +1330,10 @@ static int parse_argv(int argc, char *argv[]) {
arg_remove = true;
break;
+ case ARG_UNSAFE:
+ arg_unsafe = true;
+ break;
+
case ARG_PREFIX:
if (strv_extend(&include_prefixes, optarg) < 0)
return log_oom();
diff --git a/tmpfiles.d/legacy.conf b/tmpfiles.d/legacy.conf
index 3fff347..a165687 100644
--- a/tmpfiles.d/legacy.conf
+++ b/tmpfiles.d/legacy.conf
@@ -29,6 +29,6 @@ d /run/lock/lockdev 0775 root lock -
# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and
# 'quotacheck.mode=force'
-r /forcefsck
-r /fastboot
-r /forcequotacheck
+r! /forcefsck
+r! /fastboot
+r! /forcequotacheck
diff --git a/tmpfiles.d/systemd-nologin.conf b/tmpfiles.d/systemd-nologin.conf
new file mode 100644
index 0000000..d61232b
--- /dev/null
+++ b/tmpfiles.d/systemd-nologin.conf
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# See tmpfiles.d(5) and systemd-forbid-user-logins.service(5).
+# This file has special suffix so it is not run by mistake.
+
+F! /run/nologin 0644 - - - "System is booting up. See pam_nologin(8)"
diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf
index a05c657..7c6d6b9 100644
--- a/tmpfiles.d/systemd.conf
+++ b/tmpfiles.d/systemd.conf
@@ -8,7 +8,7 @@
# See tmpfiles.d(5) for details
d /run/user 0755 root root ~10d
-F /run/utmp 0664 root utmp -
+F! /run/utmp 0664 root utmp -
f /var/log/wtmp 0664 root utmp -
f /var/log/btmp 0600 root utmp -
@@ -22,8 +22,6 @@ d /run/systemd/users 0755 root root -
d /run/systemd/machines 0755 root root -
d /run/systemd/shutdown 0755 root root -
-F /run/nologin 0644 - - - "System is booting up. See pam_nologin(8)"
-
m /var/log/journal 2755 root systemd-journal - -
m /var/log/journal/%m 2755 root systemd-journal - -
m /run/log/journal 2755 root systemd-journal - -
diff --git a/tmpfiles.d/x11.conf b/tmpfiles.d/x11.conf
index ece6a5c..4c96a54 100644
--- a/tmpfiles.d/x11.conf
+++ b/tmpfiles.d/x11.conf
@@ -15,4 +15,4 @@ d /tmp/.font-unix 1777 root root 10d
d /tmp/.Test-unix 1777 root root 10d
# Unlink the X11 lock files
-r /tmp/.X[0-9]*-lock
+r! /tmp/.X[0-9]*-lock
diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in
index 3405e28..c2dcae0 100644
--- a/units/systemd-tmpfiles-setup.service.in
+++ b/units/systemd-tmpfiles-setup.service.in
@@ -6,7 +6,7 @@
# (at your option) any later version.
[Unit]
-Description=Recreate Volatile Files and Directories
+Description=Create Volatile Files and Directories
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
DefaultDependencies=no
Wants=local-fs.target
@@ -18,8 +18,10 @@ ConditionDirectoryNotEmpty=|/lib/tmpfiles.d
ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d
ConditionDirectoryNotEmpty=|/etc/tmpfiles.d
ConditionDirectoryNotEmpty=|/run/tmpfiles.d
+RefuseManualStart=yes
+RefuseManualStop=yes
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --exclude-prefix=/dev
+ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --unsafe --exclude-prefix=/dev

View File

@ -0,0 +1,43 @@
From 5e86ba530ae6f7a4c9aec4069b0b8481003094c6 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Tue, 24 Dec 2013 16:42:06 -0500
Subject: [PATCH] sleep-config: fix useless check for swapfile type
Since 0c6f1f4ea49 the check was useless, because the kernel will
ever only write "partition" or "file" there.
OTOH, it is possible that "\\040(deleted)" (escaped " (deleted)")
will be added for removed files. This should not happen, so add
a warning to detect those cases.
---
src/shared/sleep-config.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index 2bb0493..d76e3ad 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -183,7 +183,7 @@ static int hibernation_partition_size(size_t *size, size_t *used) {
(void) fscanf(f, "%*s %*s %*s %*s %*s\n");
for (i = 1;; i++) {
- _cleanup_free_ char *dev = NULL, *d = NULL, *type = NULL;
+ _cleanup_free_ char *dev = NULL, *type = NULL;
size_t size_field, used_field;
int k;
@@ -202,12 +202,8 @@ static int hibernation_partition_size(size_t *size, size_t *used) {
continue;
}
- d = cunescape(dev);
- if (!d)
- return -ENOMEM;
-
- if (!streq(type, "partition") && !streq(type, "file")) {
- log_debug("Partition %s has type %s, ignoring.", d, type);
+ if (streq(type, "partition") && endswith(dev, "\\040(deleted)")) {
+ log_warning("Ignoring deleted swapfile '%s'.", dev);
continue;
}

View File

@ -0,0 +1,178 @@
From 2c3dd6140293fb09b4c78b5db2dbcad35ee7d002 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 26 Dec 2013 01:52:01 +0100
Subject: [PATCH] journalctl: make sure -b --foobar cannot be misunderstood as
--boot=--foobar
Conflicts:
src/journal/journalctl.c
src/systemd/sd-bus.h
---
src/journal/journalctl.c | 111 +++++++++++++++++++++++++----------------------
1 file changed, 60 insertions(+), 51 deletions(-)
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 1d66792..ccd96b2 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -72,7 +72,8 @@ static bool arg_no_tail = false;
static bool arg_quiet = false;
static bool arg_merge = false;
static bool arg_boot = false;
-static char *arg_boot_descriptor = NULL;
+static sd_id128_t arg_boot_id = {};
+static int arg_boot_offset = 0;
static bool arg_dmesg = false;
static const char *arg_cursor = NULL;
static const char *arg_after_cursor = NULL;
@@ -122,6 +123,41 @@ static void pager_open_if_enabled(void) {
pager_open(arg_pager_end);
}
+static int parse_boot_descriptor(const char *x, sd_id128_t *boot_id, int *offset) {
+ sd_id128_t id = SD_ID128_NULL;
+ int off = 0, r;
+
+ if (strlen(x) >= 32) {
+ char *t;
+
+ t = strndupa(x, 32);
+ r = sd_id128_from_string(t, &id);
+ if (r >= 0)
+ x += 32;
+
+ if (*x != '-' && *x != '+' && *x != 0)
+ return -EINVAL;
+
+ if (*x != 0) {
+ r = safe_atoi(x, &off);
+ if (r < 0)
+ return r;
+ }
+ } else {
+ r = safe_atoi(x, &off);
+ if (r < 0)
+ return r;
+ }
+
+ if (boot_id)
+ *boot_id = id;
+
+ if (offset)
+ *offset = off;
+
+ return 0;
+}
+
static int help(void) {
pager_open_if_enabled();
@@ -365,16 +401,23 @@ static int parse_argv(int argc, char *argv[]) {
case 'b':
arg_boot = true;
- if (optarg)
- arg_boot_descriptor = optarg;
- else if (optind < argc) {
- int boot;
+ if (optarg) {
+ r = parse_boot_descriptor(optarg, &arg_boot_id, &arg_boot_offset);
+ if (r < 0) {
+ log_error("Failed to parse boot descriptor '%s'", optarg);
+ return -EINVAL;
+ }
+ } else {
+
+ /* Hmm, no argument? Maybe the next
+ * word on the command line is
+ * supposed to be the argument? Let's
+ * see if there is one and is parsable
+ * as a boot descriptor... */
- if (argv[optind][0] != '-' ||
- safe_atoi(argv[optind], &boot) >= 0) {
- arg_boot_descriptor = argv[optind];
+ if (optind < argc &&
+ parse_boot_descriptor(argv[optind], &arg_boot_id, &arg_boot_offset) >= 0)
optind++;
- }
}
break;
@@ -809,9 +852,6 @@ static int get_relative_boot_id(sd_journal *j, sd_id128_t *boot_id, int relative
assert(j);
assert(boot_id);
- if (relative == 0 && !sd_id128_equal(*boot_id, SD_ID128_NULL))
- return 0;
-
r = sd_journal_query_unique(j, "_BOOT_ID");
if (r < 0)
return r;
@@ -878,58 +918,27 @@ static int get_relative_boot_id(sd_journal *j, sd_id128_t *boot_id, int relative
static int add_boot(sd_journal *j) {
char match[9+32+1] = "_BOOT_ID=";
- char *offset;
- sd_id128_t boot_id = SD_ID128_NULL;
- int r, relative = 0;
+ int r;
assert(j);
if (!arg_boot)
return 0;
- if (!arg_boot_descriptor)
+ if (arg_boot_offset == 0 && sd_id128_equal(arg_boot_id, SD_ID128_NULL))
return add_match_this_boot(j);
- if (strlen(arg_boot_descriptor) >= 32) {
- char tmp = arg_boot_descriptor[32];
- arg_boot_descriptor[32] = '\0';
- r = sd_id128_from_string(arg_boot_descriptor, &boot_id);
- arg_boot_descriptor[32] = tmp;
-
- if (r < 0) {
- log_error("Failed to parse boot ID '%.32s': %s",
- arg_boot_descriptor, strerror(-r));
- return r;
- }
-
- offset = arg_boot_descriptor + 32;
-
- if (*offset && *offset != '-' && *offset != '+') {
- log_error("Relative boot ID offset must start with a '+' or a '-', found '%s' ", offset);
- return -EINVAL;
- }
- } else
- offset = arg_boot_descriptor;
-
- if (*offset) {
- r = safe_atoi(offset, &relative);
- if (r < 0) {
- log_error("Failed to parse relative boot ID number '%s'", offset);
- return -EINVAL;
- }
- }
-
- r = get_relative_boot_id(j, &boot_id, relative);
+ r = get_relative_boot_id(j, &arg_boot_id, arg_boot_offset);
if (r < 0) {
- if (sd_id128_equal(boot_id, SD_ID128_NULL))
- log_error("Failed to look up boot %+d: %s", relative, strerror(-r));
+ if (sd_id128_equal(arg_boot_id, SD_ID128_NULL))
+ log_error("Failed to look up boot %+i: %s", arg_boot_offset, strerror(-r));
else
- log_error("Failed to look up boot ID "SD_ID128_FORMAT_STR"%+d: %s",
- SD_ID128_FORMAT_VAL(boot_id), relative, strerror(-r));
+ log_error("Failed to look up boot ID "SD_ID128_FORMAT_STR"%+i: %s",
+ SD_ID128_FORMAT_VAL(arg_boot_id), arg_boot_offset, strerror(-r));
return r;
}
- sd_id128_to_string(boot_id, match + 9);
+ sd_id128_to_string(arg_boot_id, match + 9);
r = sd_journal_add_match(j, match, sizeof(match) - 1);
if (r < 0) {

View File

@ -0,0 +1,725 @@
From 424e80301de3b39d8641a49a7755af6dc3d6b4e8 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Thu, 26 Dec 2013 02:47:43 +0100
Subject: [PATCH] man: resolve word omissions
This is a recurring submission and includes corrections to:
word omissions and word class choice.
Conflicts:
man/sd_bus_message_get_cookie.xml
man/sd_bus_request_name.xml
man/sd_watchdog_enabled.xml
man/systemd-getty-generator.xml
---
man/binfmt.d.xml | 4 ++--
man/journald.conf.xml | 2 +-
man/loginctl.xml | 2 +-
man/sd-daemon.xml | 2 +-
man/sd-journal.xml | 2 +-
man/sd-login.xml | 4 ++--
man/sd_booted.xml | 2 +-
man/sd_get_seats.xml | 8 ++++----
man/sd_id128_get_machine.xml | 2 +-
man/sd_id128_randomize.xml | 2 +-
man/sd_id128_to_string.xml | 2 +-
man/sd_is_fifo.xml | 2 +-
man/sd_journal_add_match.xml | 2 +-
man/sd_journal_get_catalog.xml | 2 +-
man/sd_journal_get_cursor.xml | 2 +-
man/sd_journal_get_cutoff_realtime_usec.xml | 2 +-
man/sd_journal_get_data.xml | 2 +-
man/sd_journal_get_fd.xml | 2 +-
man/sd_journal_get_realtime_usec.xml | 2 +-
man/sd_journal_get_usage.xml | 2 +-
man/sd_journal_next.xml | 6 +++---
man/sd_journal_print.xml | 2 +-
man/sd_journal_query_unique.xml | 2 +-
man/sd_journal_seek_head.xml | 4 ++--
man/sd_journal_stream_fd.xml | 2 +-
man/sd_listen_fds.xml | 4 ++--
man/sd_login_monitor_new.xml | 2 +-
man/sd_notify.xml | 4 ++--
man/sd_pid_get_session.xml | 2 +-
man/sd_seat_get_active.xml | 2 +-
man/sd_session_is_active.xml | 2 +-
man/sd_uid_get_state.xml | 4 ++--
man/sysctl.d.xml | 4 ++--
man/systemctl.xml | 4 ++--
man/systemd-getty-generator.xml | 8 ++++----
man/systemd-halt.service.xml | 2 +-
man/systemd-machine-id-setup.xml | 2 +-
man/systemd.preset.xml | 4 ++--
man/systemd.service.xml | 2 +-
man/systemd.socket.xml | 4 ++--
man/systemd.unit.xml | 4 ++--
man/tmpfiles.d.xml | 4 ++--
42 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/man/binfmt.d.xml b/man/binfmt.d.xml
index 94f97e0..6f8668b 100644
--- a/man/binfmt.d.xml
+++ b/man/binfmt.d.xml
@@ -88,8 +88,8 @@
administrator, who may use this logic to override the
configuration files installed from vendor
packages. All files are sorted by their filename in
- lexicographic order, regardless in which of the
- directories they reside. If multiple files specify
+ lexicographic order, regardless of which of the
+ directories they reside in. If multiple files specify
the same binary type name, the entry in the file with
the lexicographically latest name will be applied.</para>
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index 8e642a3..b362c5d 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -155,7 +155,7 @@
into the system journal. If
<literal>uid</literal>, any user ID
will get his own journal files
- regardless whether it belongs to a
+ regardless of whether it belongs to a
system service or refers to a real
logged in user. If
<literal>none</literal>, journal files
diff --git a/man/loginctl.xml b/man/loginctl.xml
index 1b54ff7..133d6cf 100644
--- a/man/loginctl.xml
+++ b/man/loginctl.xml
@@ -109,7 +109,7 @@
<listitem><para>When showing
session/user/seat properties, show all
- properties regardless whether they are
+ properties regardless of whether they are
set or not.</para></listitem>
</varlistentry>
diff --git a/man/sd-daemon.xml b/man/sd-daemon.xml
index 6e804e1..84c1afa 100644
--- a/man/sd-daemon.xml
+++ b/man/sd-daemon.xml
@@ -144,7 +144,7 @@
<para>These APIs are implemented in the reference
implementation's <filename>sd-daemon.c</filename> and
<filename>sd-daemon.h</filename> files. These
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-daemon</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file. Alternatively, applications consuming these APIs
diff --git a/man/sd-journal.xml b/man/sd-journal.xml
index 6d39611..832d584 100644
--- a/man/sd-journal.xml
+++ b/man/sd-journal.xml
@@ -98,7 +98,7 @@
<refsect1>
<title>Notes</title>
- <para>These APIs are implemented as shared library,
+ <para>These APIs are implemented as a shared library,
which can be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd-login.xml b/man/sd-login.xml
index 251b35b..1d47b29 100644
--- a/man/sd-login.xml
+++ b/man/sd-login.xml
@@ -99,7 +99,7 @@
caller with the libc
<citerefentry><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
call after use, including the strings referenced
- therein. Similar, individual strings returned need to
+ therein. Similarly, individual strings returned need to
be freed, as well.</para>
<para>As a special exception, instead of an empty
@@ -120,7 +120,7 @@
<refsect1>
<title>Notes</title>
- <para>These APIs are implemented as shared library,
+ <para>These APIs are implemented as a shared library,
which can be compiled and linked to with the
<constant>libsystemd-login</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_booted.xml b/man/sd_booted.xml
index 64c0cd9..6f8cc95 100644
--- a/man/sd_booted.xml
+++ b/man/sd_booted.xml
@@ -100,7 +100,7 @@
in the reference implementation's
<filename>sd-daemon.c</filename> and
<filename>sd-daemon.h</filename> files. These
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-daemon</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file. Alternatively, applications consuming these APIs
diff --git a/man/sd_get_seats.xml b/man/sd_get_seats.xml
index 8254b7c..1e55af3 100644
--- a/man/sd_get_seats.xml
+++ b/man/sd_get_seats.xml
@@ -90,13 +90,13 @@
<constant>NULL</constant> may be returned and should be considered
equivalent to an empty array.</para>
- <para>Similar, <function>sd_get_sessions()</function> may
+ <para>Similarly, <function>sd_get_sessions()</function> may
be used to determine all current login sessions.</para>
- <para>Similar, <function>sd_get_uids()</function> may
+ <para>Similarly, <function>sd_get_uids()</function> may
be used to determine all Unix users who currently have login sessions.</para>
- <para>Similar,
+ <para>Similarly,
<function>sd_get_machine_names()</function> may be
used to determine all current virtual machines and
containers on the system.</para>
@@ -122,7 +122,7 @@
<function>sd_get_sessions()</function>,
<function>sd_get_uids()</function> and
<function>sd_get_machine_names()</function> interfaces
- are available as shared library, which can be compiled
+ are available as a shared library, which can be compiled
and linked to with the
<constant>libsystemd-login</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_id128_get_machine.xml b/man/sd_id128_get_machine.xml
index 6bee7ad..084fda2 100644
--- a/man/sd_id128_get_machine.xml
+++ b/man/sd_id128_get_machine.xml
@@ -116,7 +116,7 @@
<para>The <function>sd_id128_get_machine()</function>
and <function>sd_id128_get_boot()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<literal>libsystemd-id128</literal> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_id128_randomize.xml b/man/sd_id128_randomize.xml
index 0b95803..100de16 100644
--- a/man/sd_id128_randomize.xml
+++ b/man/sd_id128_randomize.xml
@@ -95,7 +95,7 @@
<title>Notes</title>
<para>The <function>sd_id128_randomize()</function> interface
- is available as shared library, which can be compiled
+ is available as a shared library, which can be compiled
and linked to with the
<literal>libsystemd-id128</literal> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_id128_to_string.xml b/man/sd_id128_to_string.xml
index 71cf82a..eae2915 100644
--- a/man/sd_id128_to_string.xml
+++ b/man/sd_id128_to_string.xml
@@ -118,7 +118,7 @@
<para>The <function>sd_id128_to_string()</function>
and <function>sd_id128_from_string()</function> interfaces are
- available as shared library, which can be compiled and
+ available as a shared library, which can be compiled and
linked to with the <literal>libsystemd-id128</literal> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
</refsect1>
diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml
index 4d9cd79..5e79453 100644
--- a/man/sd_is_fifo.xml
+++ b/man/sd_is_fifo.xml
@@ -208,7 +208,7 @@
related functions are implemented in the reference
implementation's <filename>sd-daemon.c</filename> and
<filename>sd-daemon.h</filename> files. These
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-daemon</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file. Alternatively, applications consuming these APIs
diff --git a/man/sd_journal_add_match.xml b/man/sd_journal_add_match.xml
index b6c7b06..6568234 100644
--- a/man/sd_journal_add_match.xml
+++ b/man/sd_journal_add_match.xml
@@ -174,7 +174,7 @@
<function>sd_journal_add_disjunction()</function>,
<function>sd_journal_add_conjunction()</function> and
<function>sd_journal_flush_matches()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_get_catalog.xml b/man/sd_journal_get_catalog.xml
index 4a7e0a1..ecd329f 100644
--- a/man/sd_journal_get_catalog.xml
+++ b/man/sd_journal_get_catalog.xml
@@ -118,7 +118,7 @@
<para>The <function>sd_journal_get_catalog()</function> and
<function>sd_journal_get_catalog_for_message_id()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_get_cursor.xml b/man/sd_journal_get_cursor.xml
index 4cee7d5..046c154 100644
--- a/man/sd_journal_get_cursor.xml
+++ b/man/sd_journal_get_cursor.xml
@@ -130,7 +130,7 @@
<para>The <function>sd_journal_get_cursor()</function>
and <function>sd_journal_test_cursor()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_get_cutoff_realtime_usec.xml b/man/sd_journal_get_cutoff_realtime_usec.xml
index 9bf8220..287c1c5 100644
--- a/man/sd_journal_get_cutoff_realtime_usec.xml
+++ b/man/sd_journal_get_cutoff_realtime_usec.xml
@@ -122,7 +122,7 @@
<function>sd_journal_get_cutoff_realtime_usec()</function>
and
<function>sd_journal_get_cutoff_monotonic_usec()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_get_data.xml b/man/sd_journal_get_data.xml
index 0e1111e..6ed52b5 100644
--- a/man/sd_journal_get_data.xml
+++ b/man/sd_journal_get_data.xml
@@ -203,7 +203,7 @@
<function>sd_journal_set_data_threshold()</function>
and
<function>sd_journal_get_data_threshold()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_get_fd.xml b/man/sd_journal_get_fd.xml
index 764f716..4b36f97 100644
--- a/man/sd_journal_get_fd.xml
+++ b/man/sd_journal_get_fd.xml
@@ -253,7 +253,7 @@ else {
<function>sd_journal_reliable_fd()</function>,
<function>sd_journal_process()</function> and
<function>sd_journal_wait()</function> interfaces are
- available as shared library, which can be compiled and
+ available as a shared library, which can be compiled and
linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_get_realtime_usec.xml b/man/sd_journal_get_realtime_usec.xml
index 8870c29..bf1aa50 100644
--- a/man/sd_journal_get_realtime_usec.xml
+++ b/man/sd_journal_get_realtime_usec.xml
@@ -122,7 +122,7 @@
<function>sd_journal_get_realtime_usec()</function>
and
<function>sd_journal_get_monotonic_usec()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_get_usage.xml b/man/sd_journal_get_usage.xml
index 180d8b2..08d8640 100644
--- a/man/sd_journal_get_usage.xml
+++ b/man/sd_journal_get_usage.xml
@@ -84,7 +84,7 @@
<title>Notes</title>
<para>The <function>sd_journal_get_usage()</function>
- interface is available as shared library, which can be
+ interface is available as a shared library, which can be
compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_next.xml b/man/sd_journal_next.xml
index 6e437d1..1409b0d 100644
--- a/man/sd_journal_next.xml
+++ b/man/sd_journal_next.xml
@@ -102,7 +102,7 @@
functions such as
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
- <para>Similar, <function>sd_journal_previous()</function> sets
+ <para>Similarly, <function>sd_journal_previous()</function> sets
the read pointer back one entry.</para>
<para><function>sd_journal_next_skip()</function> and
@@ -129,7 +129,7 @@
<citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>
and <function>sd_journal_next()</function> in order to
make iterating through the journal easier. See below
- for an example. Similar,
+ for an example. Similarly,
<function>SD_JOURNAL_FOREACH_BACKWARDS()</function>
may be used for iterating the journal in reverse
order.</para>
@@ -156,7 +156,7 @@
<para>The <function>sd_journal_next()</function>, <function>sd_journal_previous()</function>,
<function>sd_journal_next_skip()</function> and
<function>sd_journal_previous_skip()</function> interfaces are
- available as shared library, which can be compiled and
+ available as a shared library, which can be compiled and
linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_print.xml b/man/sd_journal_print.xml
index e61a648..a716cc3 100644
--- a/man/sd_journal_print.xml
+++ b/man/sd_journal_print.xml
@@ -227,7 +227,7 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
<function>sd_journal_printv()</function>,
<function>sd_journal_send()</function> and
<function>sd_journal_sendv()</function> interfaces
- are available as shared library, which can be compiled
+ are available as a shared library, which can be compiled
and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_query_unique.xml b/man/sd_journal_query_unique.xml
index f5d9d2b..f0b9204 100644
--- a/man/sd_journal_query_unique.xml
+++ b/man/sd_journal_query_unique.xml
@@ -156,7 +156,7 @@
<para>The <function>sd_journal_query_unique()</function>,
<function>sd_journal_enumerate_unique()</function> and
<function>sd_journal_restart_unique()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_seek_head.xml b/man/sd_journal_seek_head.xml
index 03de30a..939f0b1 100644
--- a/man/sd_journal_seek_head.xml
+++ b/man/sd_journal_seek_head.xml
@@ -94,7 +94,7 @@
seeks to the beginning of the journal, i.e. the oldest
available entry.</para>
- <para>Similar,
+ <para>Similarly,
<function>sd_journal_seek_tail()</function> may be
used to seek to the end of the journal, i.e. the most
recent available entry.</para>
@@ -156,7 +156,7 @@
<function>sd_journal_seek_monotonic_usec()</function>,
<function>sd_journal_seek_realtime_usec()</function>,
and <function>sd_journal_seek_cursor()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_journal_stream_fd.xml b/man/sd_journal_stream_fd.xml
index 4bd0abc..a8dc8fd 100644
--- a/man/sd_journal_stream_fd.xml
+++ b/man/sd_journal_stream_fd.xml
@@ -112,7 +112,7 @@
<title>Notes</title>
<para>The <function>sd_journal_stream_fd()</function>
- interface is available as shared library, which can
+ interface is available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml
index 240300d..aaabdbf 100644
--- a/man/sd_listen_fds.xml
+++ b/man/sd_listen_fds.xml
@@ -73,7 +73,7 @@
parameter is non-zero,
<function>sd_listen_fds()</function> will unset the
<varname>$LISTEN_FDS</varname>/<varname>$LISTEN_PID</varname>
- environment variables before returning (regardless
+ environment variables before returning (regardless of
whether the function call itself succeeded or
not). Further calls to
<function>sd_listen_fds()</function> will then fail,
@@ -149,7 +149,7 @@
implemented in the reference implementation's
<filename>sd-daemon.c</filename> and
<filename>sd-daemon.h</filename> files. These
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-daemon</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file. Alternatively, applications consuming these APIs
diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml
index 909a3d9..f439d3e 100644
--- a/man/sd_login_monitor_new.xml
+++ b/man/sd_login_monitor_new.xml
@@ -224,7 +224,7 @@ else {
<function>sd_login_monitor_get_fd()</function>,
<function>sd_login_monitor_get_events()</function> and
<function>sd_login_monitor_get_timeout()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-login</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_notify.xml b/man/sd_notify.xml
index 55965ff..e078140 100644
--- a/man/sd_notify.xml
+++ b/man/sd_notify.xml
@@ -79,7 +79,7 @@
<para>If the <parameter>unset_environment</parameter>
parameter is non-zero, <function>sd_notify()</function>
will unset the <varname>$NOTIFY_SOCKET</varname>
- environment variable before returning (regardless
+ environment variable before returning (regardless of
whether the function call itself succeeded or
not). Further calls to
<function>sd_notify()</function> will then fail, but
@@ -236,7 +236,7 @@
the reference implementation's
<filename>sd-daemon.c</filename> and
<filename>sd-daemon.h</filename> files. These
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-daemon</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file. Alternatively, applications consuming these APIs
diff --git a/man/sd_pid_get_session.xml b/man/sd_pid_get_session.xml
index e5c7709..ff5905b 100644
--- a/man/sd_pid_get_session.xml
+++ b/man/sd_pid_get_session.xml
@@ -186,7 +186,7 @@
<function>sd_pid_get_owner_uid()</function>,
<function>sd_pid_get_machine_name()</function> and
<function>sd_pid_get_slice()</function> interfaces are
- available as shared library, which can be compiled and
+ available as a shared library, which can be compiled and
linked to with the
<constant>libsystemd-login</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml
index cd87696..23d582d 100644
--- a/man/sd_seat_get_active.xml
+++ b/man/sd_seat_get_active.xml
@@ -164,7 +164,7 @@
<function>sd_seat_can_multi_session()</function>,
<function>sd_seat_can_tty()</function> and
<function>sd_seat_can_grapical()</function> interfaces
- are available as shared library, which can be compiled
+ are available as a shared library, which can be compiled
and linked to with the
<constant>libsystemd-login</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_session_is_active.xml b/man/sd_session_is_active.xml
index 293ce71..06891f7 100644
--- a/man/sd_session_is_active.xml
+++ b/man/sd_session_is_active.xml
@@ -252,7 +252,7 @@
<function>sd_session_get_class()</function>,
<function>sd_session_get_display()</function> and
<function>sd_session_get_tty()</function>
- interfaces are available as shared library, which can
+ interfaces are available as a shared library, which can
be compiled and linked to with the
<constant>libsystemd-login</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
diff --git a/man/sd_uid_get_state.xml b/man/sd_uid_get_state.xml
index d4d23f4..0faa765 100644
--- a/man/sd_uid_get_state.xml
+++ b/man/sd_uid_get_state.xml
@@ -139,7 +139,7 @@
be returned and should be considered equivalent to an
empty array.</para>
- <para>Similar, <function>sd_uid_get_seats()</function>
+ <para>Similarly, <function>sd_uid_get_seats()</function>
may be used to determine the list of seats on which
the user currently has sessions. Similar semantics
apply, however note that the user may have
@@ -171,7 +171,7 @@
<function>sd_uid_is_on_seat()</function>,
<function>sd_uid_get_sessions()</function>, and
<function>sd_uid_get_seats()</function> interfaces are
- available as shared library, which can be compiled and
+ available as a shared library, which can be compiled and
linked to with the <constant>libsystemd-login</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
</refsect1>
diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml
index 854864c..5544283 100644
--- a/man/sysctl.d.xml
+++ b/man/sysctl.d.xml
@@ -89,8 +89,8 @@
administrator, who may use this logic to override the
configuration files installed by vendor packages. All
configuration files are sorted by their filename in
- lexicographic order, regardless in which of the
- directories they reside. If multiple files specify the
+ lexicographic order, regardless of which of the
+ directories they reside in. If multiple files specify the
same variable name, the entry in the file with the
lexicographically latest name will be applied. It is
recommended to prefix all filenames with a two-digit
diff --git a/man/systemctl.xml b/man/systemctl.xml
index b4bc15d..61deb19 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -250,7 +250,7 @@ systemctl start foo
sleep state. Any user may take these locks and privileged
users may override these locks. If any locks are taken,
shutdown and sleep state requests will normally fail
- (regardless if privileged or not) and a list of active locks
+ (regardless of whether privileged or not) and a list of active locks
is printed. However, if <option>--ignore-inhibitors</option>
is specified, the locks are ignored and not printed, and the
operation attempted anyway, possibly requiring additional
@@ -445,7 +445,7 @@ systemctl start foo
with identical immediate effects, however, since the latter
is lost on reboot, the changes are lost too.</para>
- <para>Similar, when used with
+ <para>Similarly, when used with
<command>set-property</command>, make changes only
temporarily, so that they are lost on the next
reboot.</para>
diff --git a/man/systemd-getty-generator.xml b/man/systemd-getty-generator.xml
index da88e72..b1993ae 100644
--- a/man/systemd-getty-generator.xml
+++ b/man/systemd-getty-generator.xml
@@ -61,10 +61,10 @@
subsystem. It will also instantiate
<filename>serial-getty@.service</filename> instances
for virtualizer consoles, if execution in a
- virtualized environment is detected. This should
- ensure that the user is shown a login prompt at the
- right place, regardless in which environment the
- system is started. For example, it is sufficient to
+ virtualized environment is detected. This
+ should ensure that the user is shown a login prompt at
+ the right place, regardless of which environment the
+ system is started in. For example, it is sufficient to
redirect the kernel console with a kernel command line
argument such as <varname>console=</varname> to get
both kernel messages and a getty prompt on a serial
diff --git a/man/systemd-halt.service.xml b/man/systemd-halt.service.xml
index 90b443f..99457aa 100644
--- a/man/systemd-halt.service.xml
+++ b/man/systemd-halt.service.xml
@@ -65,7 +65,7 @@
<para><filename>systemd-halt.service</filename> is a
system service that is pulled in by
<filename>halt.target</filename> and is responsible
- for the actual system halt. Similar,
+ for the actual system halt. Similarly,
<filename>systemd-poweroff.service</filename> is
pulled in by <filename>poweroff.target</filename>,
<filename>systemd-reboot.service</filename> by
diff --git a/man/systemd-machine-id-setup.xml b/man/systemd-machine-id-setup.xml
index fef76bc..bc38d55 100644
--- a/man/systemd-machine-id-setup.xml
+++ b/man/systemd-machine-id-setup.xml
@@ -80,7 +80,7 @@
UUID passed is sufficiently unique and is different
for every booted instanced of the VM.</para>
- <para>Similar, if run inside a Linux container
+ <para>Similarly, if run inside a Linux container
environment and a UUID is set for the container this
is used to initialize the machine ID. For details see
the documentation of the <ulink
diff --git a/man/systemd.preset.xml b/man/systemd.preset.xml
index 16db8cd..55cb4de 100644
--- a/man/systemd.preset.xml
+++ b/man/systemd.preset.xml
@@ -126,8 +126,8 @@
administrator, who may use this logic to override the
preset files installed by vendor packages. All preset
files are sorted by their filename in lexicographic
- order, regardless in which of the directories they
- reside. If multiple files specify the same unit name,
+ order, regardless of which of the directories they
+ reside in. If multiple files specify the same unit name,
the entry in the file with the lexicographically earliest
name will be applied. It is recommended to prefix all
filenames with a two-digit number and a dash, to simplify
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 8f9137c..80a935d 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -712,7 +712,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}
timeout for the service expires.
If set to
<option>always</option>, the service
- will be restarted regardless whether
+ will be restarted regardless of whether
it exited cleanly or not, got
terminated abnormally by a signal or
hit a timeout.</para>
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index 1c78562..ac3127d 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -213,7 +213,7 @@
traffic on any of the sockets will
trigger service activation, and all
listed sockets will be passed to the
- service, regardless whether there is
+ service, regardless of whether there is
incoming traffic on them or not. If
the empty string is assigned to any of
these options, the list of addresses
@@ -225,7 +225,7 @@
it is often desirable to listen on it
before the interface it is configured
on is up and running, and even
- regardless whether it will be up and
+ regardless of whether it will be up and
running ever at all. To deal with this
it is recommended to set the
<varname>FreeBind=</varname> option
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 77127ff..b70c5e9 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -634,7 +634,7 @@
dependency on another unit is shut
down while the latter is started up,
the shut down is ordered before the
- start-up regardless whether the
+ start-up regardless of whether the
ordering dependency is actually of
type <varname>After=</varname> or
<varname>Before=</varname>. If two
@@ -938,7 +938,7 @@
exists, is a regular file and marked
executable.</para>
- <para>Similar,
+ <para>Similarly,
<varname>ConditionKernelCommandLine=</varname>
may be used to check whether a
specific kernel command line option is
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index 39aa68d..ed88751 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -88,8 +88,8 @@
the local administrator, who may use this logic to
override the configuration files installed by vendor
packages. All configuration files are sorted by their
- filename in lexicographic order, regardless in which
- of the directories they reside. If multiple files
+ filename in lexicographic order, regardless of which
+ of the directories they reside in. If multiple files
specify the same path, the entry in the file with the
lexicographically earliest name will be applied, all
all other conflicting entries logged as errors.</para>

View File

@ -0,0 +1,507 @@
From 4a1155c88d295e81037fd8a48b585a00fbf43cbc Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Thu, 26 Dec 2013 02:47:44 +0100
Subject: [PATCH] man: improvements to comma placement
This is a recurring submission and includes corrections to:
comma placement.
Conflicts:
man/sd_bus_message_get_cookie.xml
man/sd_bus_request_name.xml
man/sd_session_is_active.xml
man/sd_watchdog_enabled.xml
man/systemctl.xml
man/systemd.exec.xml
man/systemd.timer.xml
man/systemd.unit.xml
---
man/halt.xml | 2 +-
man/hostnamectl.xml | 2 +-
man/sd-daemon.xml | 4 ++--
man/sd-readahead.xml | 2 +-
man/sd_booted.xml | 2 +-
man/sd_get_seats.xml | 2 +-
man/sd_is_fifo.xml | 2 +-
man/sd_listen_fds.xml | 2 +-
man/sd_login_monitor_new.xml | 6 +++---
man/sd_notify.xml | 2 +-
man/sd_readahead.xml | 2 +-
man/sd_seat_get_active.xml | 4 ++--
man/sd_uid_get_state.xml | 4 ++--
man/shutdown.xml | 2 +-
man/systemd-analyze.xml | 2 +-
man/systemd-ask-password.xml | 2 +-
man/systemd-cat.xml | 2 +-
man/systemd-cgls.xml | 2 +-
man/systemd-cgtop.xml | 2 +-
man/systemd-coredumpctl.xml | 2 +-
man/systemd-delta.xml | 2 +-
man/systemd-machine-id-setup.xml | 2 +-
man/systemd-notify.xml | 2 +-
man/systemd-tmpfiles.xml | 2 +-
man/systemd-tty-ask-password-agent.xml | 2 +-
man/systemd.device.xml | 2 +-
man/systemd.mount.xml | 2 +-
man/systemd.service.xml | 2 +-
man/systemd.special.xml | 2 +-
man/systemd.swap.xml | 2 +-
man/systemd.xml | 2 +-
man/telinit.xml | 2 +-
man/timedatectl.xml | 2 +-
33 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/man/halt.xml b/man/halt.xml
index 2a13d3c..f54a864 100644
--- a/man/halt.xml
+++ b/man/halt.xml
@@ -148,7 +148,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
index b39fb55..a0776f5 100644
--- a/man/hostnamectl.xml
+++ b/man/hostnamectl.xml
@@ -255,7 +255,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/sd-daemon.xml b/man/sd-daemon.xml
index 84c1afa..b48eac9 100644
--- a/man/sd-daemon.xml
+++ b/man/sd-daemon.xml
@@ -83,7 +83,7 @@
<citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>
for more information about the functions
- implemented. In addition to these functions a couple
+ implemented. In addition to these functions, a couple
of logging prefixes are defined as macros:</para>
<programlisting>#define SD_EMERG "&lt;0&gt;" /* system is unusable */
@@ -135,7 +135,7 @@
implementation. See the respective function man pages
for details.</para>
- <para>In addition, for details about the algorithms
+ <para>In addition, for details about the algorithms,
check the liberally licensed reference implementation
sources:
<ulink url="http://cgit.freedesktop.org/systemd/systemd/plain/src/libsystemd-daemon/sd-daemon.c"/>
diff --git a/man/sd-readahead.xml b/man/sd-readahead.xml
index f8a0a0b..bcc46b2 100644
--- a/man/sd-readahead.xml
+++ b/man/sd-readahead.xml
@@ -83,7 +83,7 @@
reference implementation. See the respective function
man pages for details.</para>
- <para>In addition, for details about the algorithms
+ <para>In addition, for details about the algorithms,
check the liberally licensed reference implementation
sources:
<ulink url="http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c"/>
diff --git a/man/sd_booted.xml b/man/sd_booted.xml
index 6f8cc95..1e38d2a 100644
--- a/man/sd_booted.xml
+++ b/man/sd_booted.xml
@@ -106,7 +106,7 @@
file. Alternatively, applications consuming these APIs
may copy the implementation into their source
tree. For more details about the reference
- implementation see
+ implementation, see
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
<para>If the reference implementation is used as
diff --git a/man/sd_get_seats.xml b/man/sd_get_seats.xml
index 1e55af3..f0e7655 100644
--- a/man/sd_get_seats.xml
+++ b/man/sd_get_seats.xml
@@ -107,7 +107,7 @@
<refsect1>
<title>Return Value</title>
- <para>On success <function>sd_get_seats()</function>,
+ <para>On success, <function>sd_get_seats()</function>,
<function>sd_get_sessions()</function>,
<function>sd_get_uids()</function> and
<function>sd_get_machine_names()</function> return the
diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml
index 5e79453..4bb2236 100644
--- a/man/sd_is_fifo.xml
+++ b/man/sd_is_fifo.xml
@@ -214,7 +214,7 @@
file. Alternatively, applications consuming these APIs
may copy the implementation into their source
tree. For more details about the reference
- implementation see
+ implementation, see
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
<para>These functions continue to work as described,
diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml
index aaabdbf..6a9e082 100644
--- a/man/sd_listen_fds.xml
+++ b/man/sd_listen_fds.xml
@@ -155,7 +155,7 @@
file. Alternatively, applications consuming these APIs
may copy the implementation into their source
tree. For more details about the reference
- implementation see
+ implementation, see
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
<para>If the reference implementation is used as
diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml
index f439d3e..14ff241 100644
--- a/man/sd_login_monitor_new.xml
+++ b/man/sd_login_monitor_new.xml
@@ -198,13 +198,13 @@ else {
<refsect1>
<title>Return Value</title>
- <para>On success
+ <para>On success,
<function>sd_login_monitor_new()</function>,
<function>sd_login_monitor_flush()</function> and
<function>sd_login_monitor_get_timeout()</function>
- return 0 or a positive integer. On success
+ return 0 or a positive integer. On success,
<function>sd_login_monitor_get_fd()</function> returns
- a Unix file descriptor. On success
+ a Unix file descriptor. On success,
<function>sd_login_monitor_get_events()</function>
returns a combination of <constant>POLLIN</constant>,
<constant>POLLOUT</constant> and suchlike. On failure,
diff --git a/man/sd_notify.xml b/man/sd_notify.xml
index e078140..aae27a8 100644
--- a/man/sd_notify.xml
+++ b/man/sd_notify.xml
@@ -241,7 +241,7 @@
<constant>libsystemd-daemon</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file. Alternatively, applications consuming these APIs
may copy the implementation into their source tree. For
- more details about the reference implementation see
+ more details about the reference implementation, see
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
<para>If the reference implementation is used as
diff --git a/man/sd_readahead.xml b/man/sd_readahead.xml
index bb01bcf..9827299 100644
--- a/man/sd_readahead.xml
+++ b/man/sd_readahead.xml
@@ -139,7 +139,7 @@
<filename>sd-readahead.h</filename> files. It is
recommended that applications consuming this API copy
the implementation into their source tree. For more
- details about the reference implementation see
+ details about the reference implementation, see
<citerefentry><refentrytitle>sd-readahead</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>
<para>If -DDISABLE_SYSTEMD is set during compilation,
diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml
index 23d582d..c64ba13 100644
--- a/man/sd_seat_get_active.xml
+++ b/man/sd_seat_get_active.xml
@@ -143,9 +143,9 @@
<refsect1>
<title>Return Value</title>
- <para> On success
+ <para> On success,
<function>sd_seat_get_active()</function>
- returns 0 or a positive integer. On success
+ returns 0 or a positive integer. On success,
<function>sd_seat_get_sessions()</function> returns
the number of entries in the session identifier
array. If the test succeeds,
diff --git a/man/sd_uid_get_state.xml b/man/sd_uid_get_state.xml
index 0faa765..30b254c 100644
--- a/man/sd_uid_get_state.xml
+++ b/man/sd_uid_get_state.xml
@@ -152,11 +152,11 @@
<refsect1>
<title>Return Value</title>
- <para>On success
+ <para>On success,
<function>sd_uid_get_state()</function> returns 0 or a
positive integer. If the test succeeds,
<function>sd_uid_is_on_seat()</function> returns a
- positive integer, if it fails
+ positive integer; if it fails,
0. <function>sd_uid_get_sessions()</function> and
<function>sd_uid_get_seats()</function> return the
number of entries in the returned arrays. On failure,
diff --git a/man/shutdown.xml b/man/shutdown.xml
index 795fb66..27e7e87 100644
--- a/man/shutdown.xml
+++ b/man/shutdown.xml
@@ -164,7 +164,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml
index aefbfc8..b7753f9 100644
--- a/man/systemd-analyze.xml
+++ b/man/systemd-analyze.xml
@@ -270,7 +270,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-ask-password.xml b/man/systemd-ask-password.xml
index 8af328d..79902cb 100644
--- a/man/systemd-ask-password.xml
+++ b/man/systemd-ask-password.xml
@@ -167,7 +167,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-cat.xml b/man/systemd-cat.xml
index ffb1dfd..ba7a2cf 100644
--- a/man/systemd-cat.xml
+++ b/man/systemd-cat.xml
@@ -158,7 +158,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-cgls.xml b/man/systemd-cgls.xml
index 432706b..152b883 100644
--- a/man/systemd-cgls.xml
+++ b/man/systemd-cgls.xml
@@ -145,7 +145,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml
index 7faedfb..0e1f7c5 100644
--- a/man/systemd-cgtop.xml
+++ b/man/systemd-cgtop.xml
@@ -264,7 +264,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-coredumpctl.xml b/man/systemd-coredumpctl.xml
index 9ccb67d..67f75d1 100644
--- a/man/systemd-coredumpctl.xml
+++ b/man/systemd-coredumpctl.xml
@@ -200,7 +200,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise. Not finding any matching coredumps is treated
as failure.
</para>
diff --git a/man/systemd-delta.xml b/man/systemd-delta.xml
index 4d3ab78..ebaa349 100644
--- a/man/systemd-delta.xml
+++ b/man/systemd-delta.xml
@@ -223,7 +223,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-machine-id-setup.xml b/man/systemd-machine-id-setup.xml
index bc38d55..7b3aa7e 100644
--- a/man/systemd-machine-id-setup.xml
+++ b/man/systemd-machine-id-setup.xml
@@ -116,7 +116,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-notify.xml b/man/systemd-notify.xml
index a769346..e14977d 100644
--- a/man/systemd-notify.xml
+++ b/man/systemd-notify.xml
@@ -172,7 +172,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
index 495247e..c678031 100644
--- a/man/systemd-tmpfiles.xml
+++ b/man/systemd-tmpfiles.xml
@@ -178,7 +178,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd-tty-ask-password-agent.xml b/man/systemd-tty-ask-password-agent.xml
index 31a18ba..cb5fb43 100644
--- a/man/systemd-tty-ask-password-agent.xml
+++ b/man/systemd-tty-ask-password-agent.xml
@@ -148,7 +148,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/systemd.device.xml b/man/systemd.device.xml
index 002b647..586473c 100644
--- a/man/systemd.device.xml
+++ b/man/systemd.device.xml
@@ -75,7 +75,7 @@
udev tag (by default all block and network devices,
and a few others). This may be used to define
dependencies between devices and other units. To tag a
- udev device use <literal>TAG+="systemd"</literal> in
+ udev device, use <literal>TAG+="systemd"</literal> in
the udev rules file, see
<citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
for details.</para>
diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml
index df5a79e..6f9f70c 100644
--- a/man/systemd.mount.xml
+++ b/man/systemd.mount.xml
@@ -94,7 +94,7 @@
in a unit file
<filename>home-lennart.mount</filename>. For details
about the escaping logic used to convert a file system
- path to a unit name see
+ path to a unit name, see
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
<para>Optionally, a mount unit may be accompanied by
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 80a935d..e869f95 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -441,7 +441,7 @@
<literal>one</literal> and
<literal>two two</literal>,
respectively. Since two commands are
- specified
+ specified,
<varname>Type=oneshot</varname> must
be used.</para>
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
index 863a029..76bb5cd 100644
--- a/man/systemd.special.xml
+++ b/man/systemd.special.xml
@@ -996,7 +996,7 @@
<filename>smartcard.target</filename>,
<filename>sound.target</filename>.</para>
- <para>In addition the following special unit is
+ <para>In addition, the following special unit is
understood only when systemd runs as service instance:</para>
<variablelist>
diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml
index 13f6c84..5e8b25f 100644
--- a/man/systemd.swap.xml
+++ b/man/systemd.swap.xml
@@ -85,7 +85,7 @@
<filename noindex='true'>/dev/sda5</filename> must be configured in a
unit file <filename>dev-sda5.swap</filename>. For
details about the escaping logic used to convert a
- file system path to a unit name see
+ file system path to a unit name, see
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
<para>All swap units automatically get the appropriate
diff --git a/man/systemd.xml b/man/systemd.xml
index 85c06d3..23a0c26 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
@@ -494,7 +494,7 @@
<filename>/proc</filename>.</para>
<para>For more information about the concepts and
- ideas behind systemd please refer to the <ulink
+ ideas behind systemd, please refer to the <ulink
url="http://0pointer.de/blog/projects/systemd.html">Original
Design Document</ulink>.</para>
diff --git a/man/telinit.xml b/man/telinit.xml
index bb80939..b20a60a 100644
--- a/man/telinit.xml
+++ b/man/telinit.xml
@@ -171,7 +171,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
diff --git a/man/timedatectl.xml b/man/timedatectl.xml
index be0ad3f..f4975ce 100644
--- a/man/timedatectl.xml
+++ b/man/timedatectl.xml
@@ -222,7 +222,7 @@
<refsect1>
<title>Exit status</title>
- <para>On success 0 is returned, a non-zero failure
+ <para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>

View File

@ -0,0 +1,79 @@
From cae52ffc976561b6c847a38e3ea9d9a9ce2c1513 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Thu, 26 Dec 2013 02:47:45 +0100
Subject: [PATCH] man: grammar and wording improvements
This is a recurring submission and includes corrections to:
- missing words, preposition choice.
- change of /lib to /usr/lib, because that is what most distros are
using as the system-wide location for systemd/udev files.
Conflicts:
man/journalctl.xml
man/sd_bus_message_get_cookie.xml
man/sd_bus_request_name.xml
man/systemctl.xml
man/systemd-networkd.service.xml
man/systemd.device.xml
man/systemd.exec.xml
man/systemd.timer.xml
man/udev.xml
---
man/daemon.xml | 2 +-
man/sd_is_fifo.xml | 2 +-
man/systemd.service.xml | 2 +-
man/systemd.unit.xml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/man/daemon.xml b/man/daemon.xml
index 7790420..1fe4546 100644
--- a/man/daemon.xml
+++ b/man/daemon.xml
@@ -408,7 +408,7 @@
description files.</para>
<para>In systemd, if the developer or
- administrator wants to make sure a service or
+ administrator wants to make sure that a service or
other unit is activated automatically on boot,
it is recommended to place a symlink to the
unit file in the <filename>.wants/</filename>
diff --git a/man/sd_is_fifo.xml b/man/sd_is_fifo.xml
index 4bb2236..58cd1c9 100644
--- a/man/sd_is_fifo.xml
+++ b/man/sd_is_fifo.xml
@@ -165,7 +165,7 @@
called to check whether the specified file descriptor
refers to a special file. If the
<parameter>path</parameter> parameter is not
- <constant>NULL</constant>, it is checked whether file
+ <constant>NULL</constant>, it is checked whether the file
descriptor is bound to the specified file
name. Special files in this context are character
device nodes and files in <filename>/proc</filename>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index e869f95..e3a370f 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -427,7 +427,7 @@
<programlisting>ExecStart=/bin/sh -c 'dmesg | tac'
</programlisting>
- <para>Only select environment variables
+ <para>Only select environment variables that
are set for executed commands. See
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index b70c5e9..f6b4b24 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -548,7 +548,7 @@
of units. When systemd stops or restarts
the units listed here, the action is
propagated to this unit.
- Note that this is a one way dependency —
+ Note that this is a one-way dependency 
changes to this unit do not affect the
listed units.
</para></listitem>

View File

@ -0,0 +1,130 @@
From 6566f27fc123e1b2fd14e5177dcb21c6b3598d5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 25 Dec 2013 23:20:57 -0500
Subject: [PATCH] man: document fail/nofail, auto/noauto
Also s/filesystem/file system/ in a few places.
Conflicts:
TODO
man/systemd-fsck@.service.xml
man/systemd-fstab-generator.xml
---
man/systemd-fsck@.service.xml | 5 ++++-
man/systemd-fstab-generator.xml | 6 ++++++
man/systemd-halt.service.xml | 2 +-
man/systemd.mount.xml | 20 +++++++++++++++++++-
man/systemd.unit.xml | 2 +-
man/udevadm.xml | 2 +-
6 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/man/systemd-fsck@.service.xml b/man/systemd-fsck@.service.xml
index e934352..c653dc5 100644
--- a/man/systemd-fsck@.service.xml
+++ b/man/systemd-fsck@.service.xml
@@ -62,7 +62,10 @@
system
check. <filename>systemd-fsck-root.service</filename> is
responsible for file system checks on the root
- file system.</para>
+ file system. The root file system check is performed
+ before the other file systems. Either service is enabled
+ at boot if passno in <filename>/etc/fstab</filename> for
+ the file system is set to a value greater than zero.</para>
<para><filename>systemd-fsck</filename> will
forward file system checking progress to the
diff --git a/man/systemd-fstab-generator.xml b/man/systemd-fstab-generator.xml
index 9ca16c7..e3cf5d2 100644
--- a/man/systemd-fstab-generator.xml
+++ b/man/systemd-fstab-generator.xml
@@ -61,6 +61,12 @@
reloaded. This will instantiate mount and swap units
as necessary.</para>
+ <para>The <varname>passno</varname> field is treated
+ like a simple boolean, and the ordering information is
+ discarded. However, if the root file system is
+ checked, it is checked before all the other
+ file systems.</para>
+
<para>See
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
and
diff --git a/man/systemd-halt.service.xml b/man/systemd-halt.service.xml
index 99457aa..bec2e36 100644
--- a/man/systemd-halt.service.xml
+++ b/man/systemd-halt.service.xml
@@ -86,7 +86,7 @@
<para>It is necessary to have this code in a separate binary
because otherwise rebooting after an upgrade might be broken 
the running PID 1 could still depend on libraries which are not
- available any more, thus keeping the filesystem busy, which
+ available any more, thus keeping the file system busy, which
then cannot be re-mounted read-only.</para>
<para>Immediately before executing the actual system
diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml
index 6f9f70c..cadf950 100644
--- a/man/systemd.mount.xml
+++ b/man/systemd.mount.xml
@@ -132,7 +132,10 @@
for details). Mounts listed in
<filename>/etc/fstab</filename> will be converted into
native units dynamically at boot and when the
- configuration of the system manager is reloaded. See
+ configuration of the system manager is reloaded. In
+ general, configuring mount points through
+ <filename>/etc/fstab</filename> is the preferred
+ approach. See
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for details about the conversion.</para>
@@ -159,6 +162,21 @@
<literal>s</literal>, <literal>min</literal>,
<literal>h</literal>, <literal>ms</literal>.</para>
+ <para>If <option>nofail</option> is given, this mount
+ will be only wanted, not required, by the
+ <filename>local-fs.target</filename>. This means that
+ the boot will continue even if this mount point is not
+ mounted successfully. Option <option>fail</option> has
+ the opposite meaning and is the default.</para>
+
+ <para>If <option>noauto</option> is given, this mount
+ will not be added as a dependency for
+ <filename>local-fs.target</filename>. This means that
+ it will not be mounted automatically during boot,
+ unless it is pulled in by some other unit. Option
+ <option>auto</option> has the opposite meaning and is
+ the default.</para>
+
<para>If a mount point is configured in both
<filename>/etc/fstab</filename> and a unit file that
is stored below <filename>/usr</filename>, the former
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index f6b4b24..4704352 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -232,7 +232,7 @@
multiple units from a single configuration file. If
systemd looks for a unit configuration file, it will
first search for the literal unit name in the
- filesystem. If that yields no success and the unit
+ file system. If that yields no success and the unit
name contains an <literal>@</literal> character, systemd will look for a
unit template that shares the same name but with the
instance string (i.e. the part between the <literal>@</literal> character
diff --git a/man/udevadm.xml b/man/udevadm.xml
index a1ffe42..ca3713f 100644
--- a/man/udevadm.xml
+++ b/man/udevadm.xml
@@ -461,7 +461,7 @@
<varlistentry>
<term><option>--root=<replaceable>string</replaceable></option></term>
<listitem>
- <para>Alternative root path in the filesystem for reading and writing files.</para>
+ <para>Alternative root path in the file system for reading and writing files.</para>
</listitem>
</varlistentry>
</variablelist>

View File

@ -0,0 +1,22 @@
From 8debc611398abf60d16e73982c9d56b5ea957e15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 24 Dec 2013 22:57:15 -0500
Subject: [PATCH] man: fix description of is-enabled returned value
---
man/systemctl.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 61deb19..25b03d8 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -932,7 +932,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
<row>
<entry><literal>static</literal></entry>
<entry>Unit is not enabled, but has no provisions for enabling in [Install] section</entry>
- <entry>1</entry>
+ <entry>0</entry>
</row>
<row>
<entry><literal>disabled</literal></entry>

View File

@ -0,0 +1,23 @@
From c32611c5388de404cf4b169fa3d757c2603e597d Mon Sep 17 00:00:00 2001
From: Marcos Felipe Rasia de Mello <marcosfrm@gmail.com>
Date: Thu, 26 Dec 2013 17:47:57 -0200
Subject: [PATCH] man: fix Type= reference
Simple man page fix attached.
---
man/systemd.service.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index e3a370f..898c19d 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -139,7 +139,7 @@
<para>If set to
<option>simple</option> (the default
- value if <varname>BusName=</varname>
+ value if <varname>Type=</varname>
is not specified), it is expected that
the process configured with
<varname>ExecStart=</varname> is the

View File

@ -0,0 +1,37 @@
From 73868c5b0a59438256d8abd4157ff915a7dc1f37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 27 Dec 2013 01:18:39 -0500
Subject: [PATCH] man: fix Type= reference v2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
grawity:
It looks like the old version _was_ correct the default value will
be "Type=dbus" if the service has a BusName set.
Suggested change: "if neither Type= nor BusName= is specified"
---
man/systemd.service.xml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 898c19d..71bcfb4 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -139,9 +139,11 @@
<para>If set to
<option>simple</option> (the default
- value if <varname>Type=</varname>
- is not specified), it is expected that
- the process configured with
+ value if neither
+ <varname>Type=</varname> nor
+ <varname>BusName=</varname> are
+ specified), it is expected that the
+ process configured with
<varname>ExecStart=</varname> is the
main process of the service. In this
mode, if the process offers

View File

@ -0,0 +1,38 @@
From d38baf3d9088a2d206a6b622fb7f609dc115bd6a Mon Sep 17 00:00:00 2001
From: Marcel Holtmann <marcel@holtmann.org>
Date: Fri, 27 Dec 2013 09:35:20 -0800
Subject: [PATCH] hwdb: Update database of Bluetooth company identifiers
---
hwdb/20-bluetooth-vendor-product.hwdb | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
index 6f8301f..192b715 100644
--- a/hwdb/20-bluetooth-vendor-product.hwdb
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
@@ -427,7 +427,7 @@ bluetooth:v008B*
ID_VENDOR_FROM_DATABASE=Topcorn Positioning Systems, LLC
bluetooth:v008C*
- ID_VENDOR_FROM_DATABASE=Qualcomm Labs, Inc.
+ ID_VENDOR_FROM_DATABASE=Qualcomm Retail Solutions, Inc. (formerly Qualcomm Labs, Inc.)
bluetooth:v008D*
ID_VENDOR_FROM_DATABASE=Zscan Software
@@ -839,3 +839,15 @@ bluetooth:v0115*
bluetooth:v0116*
ID_VENDOR_FROM_DATABASE=1OAK Technologies
+
+bluetooth:v0117*
+ ID_VENDOR_FROM_DATABASE=Wimoto Technologies Inc
+
+bluetooth:v0118*
+ ID_VENDOR_FROM_DATABASE=Radius Networks, Inc.
+
+bluetooth:v0119*
+ ID_VENDOR_FROM_DATABASE=Wize Technology Co., Ltd.
+
+bluetooth:v011A*
+ ID_VENDOR_FROM_DATABASE=Qualcomm Labs, Inc.

View File

@ -0,0 +1,61 @@
From 16142c7f1f24c58af1388608f1efb382a094bcb5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 27 Dec 2013 15:27:24 -0500
Subject: [PATCH] man: add a note about propagating signals
---
man/systemd.service.xml | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 71bcfb4..af3e0f2 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -734,22 +734,33 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}
considered successful termination, in
addition to the normal successful exit
code 0 and the signals <constant>SIGHUP</constant>, <constant>SIGINT</constant>,
- <constant>SIGTERM</constant> and <constant>SIGPIPE</constant>. Exit status
+ <constant>SIGTERM</constant>, and <constant>SIGPIPE</constant>. Exit status
definitions can either be numeric exit
codes or termination signal names,
- separated by spaces. Example:
- <literal>SuccessExitStatus=1 2 8
- <constant>SIGKILL</constant></literal>, ensures that exit
- codes 1, 2, 8 and the termination
- signal <constant>SIGKILL</constant> are considered clean
- service terminations. This option may
- appear more than once in which case
- the list of successful exit statuses
- is merged. If the empty string is
- assigned to this option, the list is
- reset, all prior assignments of this
- option will have no
- effect.</para></listitem>
+ separated by spaces. For example:
+ <programlisting>SuccessExitStatus=1 2 8 <constant>SIGKILL</constant></programlisting>
+ ensures that exit codes 1, 2, 8 and
+ the termination signal
+ <constant>SIGKILL</constant> are
+ considered clean service terminations.
+ </para>
+
+ <para>Note that if a process has a
+ signal handler installed and exits by
+ calling
+ <citerefentry><refentrytitle>_exit</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ in response to a signal, the
+ information about the signal is lost.
+ Programs should instead perform cleanup and kill themselves with the same signal instead. See
+ <ulink url="http://www.cons.org/cracauer/sigint.html">Proper handling of SIGINT/SIGQUIT — How to be a proper program</ulink>.</para>
+
+ <para>This option may appear more than once
+ in which case the list of successful
+ exit statuses is merged. If the empty
+ string is assigned to this option, the
+ list is reset, all prior assignments
+ of this option will have no
+ effect.</para></listitem>
</varlistentry>
<varlistentry>

View File

@ -0,0 +1,41 @@
From cc5b9c30f5e8312ee8905f7882da7ab79fef571c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 27 Dec 2013 23:44:27 -0500
Subject: [PATCH] man: include autoconf snippet in daemon(7)
https://bugs.freedesktop.org/show_bug.cgi?id=40446
---
man/daemon.xml | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/man/daemon.xml b/man/daemon.xml
index 1fe4546..105826a 100644
--- a/man/daemon.xml
+++ b/man/daemon.xml
@@ -765,12 +765,20 @@
<programlisting>PKG_PROG_PKG_CONFIG
AC_ARG_WITH([systemdsystemunitdir],
- AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
- [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
-if test "x$with_systemdsystemunitdir" != xno; then
- AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
-fi
-AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])</programlisting>
+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),,
+ [with_systemdsystemunitdir=auto])
+AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
+ def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+
+ AS_IF([test "x$def_systemdsystemunitdir" = "x"],
+ [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
+ [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
+ with_systemdsystemunitdir=no],
+ [with_systemdsystemunitdir=$def_systemdsystemunitdir])])
+AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
+ [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
+AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$with_systemdsystemunitdir" != "xno"])
+</programlisting>
<para>This snippet allows automatic
installation of the unit files on systemd

View File

@ -0,0 +1,325 @@
From 2a683cff7e7ac4f94ce545a0907d5b5b883c2a36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 29 Dec 2013 23:39:28 -0500
Subject: [PATCH] systemd-python: fix setting of exception codes
The return value of 0 would be treated as failure by mistake,
resulting in " SystemError: error return without exception set".
The way that set_error() is used is changed to be the same
everywhere.
---
src/python-systemd/_daemon.c | 14 +++++-----
src/python-systemd/_reader.c | 63 ++++++++++++++++++++------------------------
2 files changed, 35 insertions(+), 42 deletions(-)
diff --git a/src/python-systemd/_daemon.c b/src/python-systemd/_daemon.c
index f0ab16f..c6db69f 100644
--- a/src/python-systemd/_daemon.c
+++ b/src/python-systemd/_daemon.c
@@ -88,7 +88,7 @@ static PyObject* notify(PyObject *self, PyObject *args, PyObject *keywds) {
#endif
r = sd_notify(unset, msg);
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
@@ -123,7 +123,7 @@ static PyObject* listen_fds(PyObject *self, PyObject *args, PyObject *keywds) {
#endif
r = sd_listen_fds(unset);
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return long_FromLong(r);
@@ -151,7 +151,7 @@ static PyObject* is_fifo(PyObject *self, PyObject *args) {
#endif
r = sd_is_fifo(fd, path);
- if (set_error(r, path, NULL))
+ if (set_error(r, path, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
@@ -179,7 +179,7 @@ static PyObject* is_mq(PyObject *self, PyObject *args) {
#endif
r = sd_is_mq(fd, path);
- if (set_error(r, path, NULL))
+ if (set_error(r, path, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
@@ -203,7 +203,7 @@ static PyObject* is_socket(PyObject *self, PyObject *args) {
return NULL;
r = sd_is_socket(fd, family, type, listening);
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
@@ -230,7 +230,7 @@ static PyObject* is_socket_inet(PyObject *self, PyObject *args) {
}
r = sd_is_socket_inet(fd, family, type, listening, (uint16_t) port);
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
@@ -265,7 +265,7 @@ static PyObject* is_socket_unix(PyObject *self, PyObject *args) {
#endif
r = sd_is_socket_unix(fd, type, listening, path, length);
- if (set_error(r, path, NULL))
+ if (set_error(r, path, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index bc5db19..0c88926 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -206,8 +206,7 @@ PyDoc_STRVAR(Reader_reliable_fd__doc__,
static PyObject* Reader_reliable_fd(Reader *self, PyObject *args)
{
int r = sd_journal_reliable_fd(self->j);
- set_error(r, NULL, NULL);
- if (r < 0)
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
}
@@ -221,8 +220,7 @@ PyDoc_STRVAR(Reader_get_events__doc__,
static PyObject* Reader_get_events(Reader *self, PyObject *args)
{
int r = sd_journal_get_events(self->j);
- set_error(r, NULL, NULL);
- if (r < 0)
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return long_FromLong(r);
}
@@ -242,8 +240,7 @@ static PyObject* Reader_get_timeout(Reader *self, PyObject *args)
uint64_t t;
r = sd_journal_get_timeout(self->j, &t);
- set_error(r, NULL, NULL);
- if (r < 0)
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
if (t == (uint64_t) -1)
@@ -265,8 +262,7 @@ static PyObject* Reader_get_timeout_ms(Reader *self, PyObject *args)
uint64_t t;
r = sd_journal_get_timeout(self->j, &t);
- set_error(r, NULL, NULL);
- if (r < 0)
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return absolute_timeout(t);
@@ -304,7 +300,7 @@ static PyObject* Reader_get_usage(Reader *self, PyObject *args)
uint64_t bytes;
r = sd_journal_get_usage(self->j, &bytes);
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
assert_cc(sizeof(unsigned long long) == sizeof(bytes));
@@ -366,8 +362,7 @@ static PyObject* Reader_next(Reader *self, PyObject *args)
assert_not_reached("should not be here");
Py_END_ALLOW_THREADS
- set_error(r, NULL, NULL);
- if (r < 0)
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
}
@@ -445,7 +440,8 @@ static PyObject* Reader_get(Reader *self, PyObject *args)
if (r == -ENOENT) {
PyErr_SetString(PyExc_KeyError, field);
return NULL;
- } else if (set_error(r, NULL, "field name is not valid"))
+ }
+ if (set_error(r, NULL, "field name is not valid") < 0)
return NULL;
r = extract(msg, msg_len, NULL, &value);
@@ -530,7 +526,7 @@ static PyObject* Reader_get_realtime(Reader *self, PyObject *args)
assert(!args);
r = sd_journal_get_realtime_usec(self->j, &timestamp);
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
assert_cc(sizeof(unsigned long long) == sizeof(timestamp));
@@ -555,7 +551,7 @@ static PyObject* Reader_get_monotonic(Reader *self, PyObject *args)
assert(!args);
r = sd_journal_get_monotonic_usec(self->j, &timestamp, &id);
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
assert_cc(sizeof(unsigned long long) == sizeof(timestamp));
@@ -598,8 +594,7 @@ static PyObject* Reader_add_match(Reader *self, PyObject *args, PyObject *keywds
return NULL;
r = sd_journal_add_match(self->j, match, match_len);
- set_error(r, NULL, "Invalid match");
- if (r < 0)
+ if (set_error(r, NULL, "Invalid match") < 0)
return NULL;
Py_RETURN_NONE;
@@ -616,8 +611,7 @@ static PyObject* Reader_add_disjunction(Reader *self, PyObject *args)
{
int r;
r = sd_journal_add_disjunction(self->j);
- set_error(r, NULL, NULL);
- if (r < 0)
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
Py_RETURN_NONE;
}
@@ -633,8 +627,7 @@ static PyObject* Reader_add_conjunction(Reader *self, PyObject *args)
{
int r;
r = sd_journal_add_conjunction(self->j);
- set_error(r, NULL, NULL);
- if (r < 0)
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
Py_RETURN_NONE;
}
@@ -661,7 +654,7 @@ static PyObject* Reader_seek_head(Reader *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS
r = sd_journal_seek_head(self->j);
Py_END_ALLOW_THREADS
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
Py_RETURN_NONE;
}
@@ -678,7 +671,7 @@ static PyObject* Reader_seek_tail(Reader *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS
r = sd_journal_seek_tail(self->j);
Py_END_ALLOW_THREADS
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
Py_RETURN_NONE;
}
@@ -699,7 +692,7 @@ static PyObject* Reader_seek_realtime(Reader *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS
r = sd_journal_seek_realtime_usec(self->j, timestamp);
Py_END_ALLOW_THREADS
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
Py_RETURN_NONE;
}
@@ -723,20 +716,20 @@ static PyObject* Reader_seek_monotonic(Reader *self, PyObject *args)
if (bootid) {
r = sd_id128_from_string(bootid, &id);
- if (set_error(r, NULL, "Invalid bootid"))
+ if (set_error(r, NULL, "Invalid bootid") < 0)
return NULL;
} else {
Py_BEGIN_ALLOW_THREADS
r = sd_id128_get_boot(&id);
Py_END_ALLOW_THREADS
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
r = sd_journal_seek_monotonic_usec(self->j, id, timestamp);
Py_END_ALLOW_THREADS
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
Py_RETURN_NONE;
@@ -809,7 +802,7 @@ static PyObject* Reader_seek_cursor(Reader *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS
r = sd_journal_seek_cursor(self->j, cursor);
Py_END_ALLOW_THREADS
- if (set_error(r, NULL, "Invalid cursor"))
+ if (set_error(r, NULL, "Invalid cursor") < 0)
return NULL;
Py_RETURN_NONE;
}
@@ -828,7 +821,7 @@ static PyObject* Reader_get_cursor(Reader *self, PyObject *args)
assert(!args);
r = sd_journal_get_cursor(self->j, &cursor);
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return unicode_FromString(cursor);
@@ -851,8 +844,7 @@ static PyObject* Reader_test_cursor(Reader *self, PyObject *args)
return NULL;
r = sd_journal_test_cursor(self->j, cursor);
- set_error(r, NULL, NULL);
- if (r < 0)
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return PyBool_FromLong(r);
@@ -876,7 +868,7 @@ static PyObject* Reader_query_unique(Reader *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS
r = sd_journal_query_unique(self->j, query);
Py_END_ALLOW_THREADS
- if (set_error(r, NULL, "Invalid field name"))
+ if (set_error(r, NULL, "Invalid field name") < 0)
return NULL;
value_set = PySet_New(0);
@@ -930,7 +922,8 @@ static PyObject* Reader_get_catalog(Reader *self, PyObject *args)
else
set_error(r, NULL, NULL);
return NULL;
- } else if (set_error(r, NULL, NULL))
+ }
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return unicode_FromString(msg);
@@ -955,13 +948,13 @@ static PyObject* get_catalog(PyObject *self, PyObject *args)
return NULL;
r = sd_id128_from_string(id_, &id);
- if (set_error(r, NULL, "Invalid id128"))
+ if (set_error(r, NULL, "Invalid id128") < 0)
return NULL;
Py_BEGIN_ALLOW_THREADS
r = sd_journal_get_catalog_for_message_id(id, &msg);
Py_END_ALLOW_THREADS
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return unicode_FromString(msg);
@@ -979,7 +972,7 @@ static PyObject* Reader_get_data_threshold(Reader *self, void *closure)
int r;
r = sd_journal_get_data_threshold(self->j, &cvalue);
- if (set_error(r, NULL, NULL))
+ if (set_error(r, NULL, NULL) < 0)
return NULL;
return long_FromSize_t(cvalue);

View File

@ -0,0 +1,22 @@
From 353a5553a38d002a69a4fbafabf1e9ab50ff32c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 30 Dec 2013 00:01:00 -0500
Subject: [PATCH] systemd-python: fix listen_fds under Python 2
---
src/python-systemd/_daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/python-systemd/_daemon.c b/src/python-systemd/_daemon.c
index c6db69f..3982e85 100644
--- a/src/python-systemd/_daemon.c
+++ b/src/python-systemd/_daemon.c
@@ -114,7 +114,7 @@ static PyObject* listen_fds(PyObject *self, PyObject *args, PyObject *keywds) {
#else
PyObject *obj = NULL;
if (!PyArg_ParseTupleAndKeywords(args, keywds, "|O:_listen_fds",
- (char**) kwlist, &unset, &obj))
+ (char**) kwlist, &obj))
return NULL;
if (obj != NULL)
unset = PyObject_IsTrue(obj);

View File

@ -0,0 +1,120 @@
From 204a710b647527c35cee26962bbd324e6cebc822 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 30 Dec 2013 00:11:30 -0500
Subject: [PATCH] man: expand on some more subtle points in systemd.socket(5)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708#1694
---
man/systemd.socket.xml | 67 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 49 insertions(+), 18 deletions(-)
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index ac3127d..570a6fb 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -85,21 +85,26 @@
processes of the socket.</para>
<para>For each socket file a matching service file
- (see
+ must exist, describing the service to start on
+ incoming traffic on the socket (see
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
- for details) must exist, describing the service to
- start on incoming traffic on the socket. Depending on
- the setting of <option>Accept=</option> (see below),
- this must either be named like the socket unit, but
- with the suffix replaced; or it must be a template
- file named the same way. Example: a socket file
+ for more information about .service files). The name
+ of the .service unit is by default the same as the
+ name of the .socket unit, but can be altered with
+ <option>Service=</option> option described below.
+ Depending on the setting of <option>Accept=</option>
+ option described below, this .service unit must either
+ be named like the .socket unit, but with the suffix
+ replaced, unless overridden with
+ <option>Service=</option>; or it must be a template
+ unit named the same way. Example: a socket file
<filename>foo.socket</filename> needs a matching
service <filename>foo.service</filename> if
<option>Accept=false</option> is set. If
- <option>Accept=true</option> is set, a service template
- file <filename>foo@.service</filename> must exist from
- which services are instantiated for each incoming
- connection.</para>
+ <option>Accept=true</option> is set, a service
+ template file <filename>foo@.service</filename> must
+ exist from which services are instantiated for each
+ incoming connection.</para>
<para>Unless <varname>DefaultDependencies=</varname>
is set to <option>false</option>, socket units will
@@ -116,9 +121,21 @@
boot or late system shutdown should disable this
option.</para>
+ <para>Socket units will have a
+ <varname>Before=</varname> dependency on the service
+ which they trigger added implicitly. No implicit
+ <varname>WantedBy=</varname> or
+ <varname>RequiredBy=</varname> dependency from the
+ socket to the service is added. This means that the
+ service may be started without the socket, in which
+ case it must be able to open sockets by itself. To
+ prevent this, an explicit <varname>Requires=</varname>
+ dependency may be added.</para>
+
<para>Socket units may be used to implement on-demand
starting of services, as well as parallelized starting
- of services.</para>
+ of services. See the blog stories linked at the end
+ for introduction.</para>
<para>Note that the daemon software configured for
socket activation with socket units needs to be able
@@ -221,12 +238,23 @@
of any of these options will have no
effect.</para>
+ <para>It is also possible to have more
+ than one socket unit for the same
+ service when using
+ <varname>Service=</varname>, and the
+ service will receive all the sockets
+ configured in all the socket units.
+ Sockets configured in one unit are
+ passed in the order of configuration,
+ but no ordering between socket units
+ is specified.</para>
+
<para>If an IP address is used here,
it is often desirable to listen on it
before the interface it is configured
on is up and running, and even
regardless of whether it will be up and
- running ever at all. To deal with this
+ running at any point. To deal with this
it is recommended to set the
<varname>FreeBind=</varname> option
described below.</para></listitem>
@@ -687,11 +715,14 @@
<term><varname>Service=</varname></term>
<listitem><para>Specifies the service
unit name to activate on incoming
- traffic. This defaults to the service
- that bears the same name as the socket
- (ignoring the different suffixes). In
- most cases it should not be necessary
- to use this option.</para></listitem>
+ traffic. This setting is only allowed
+ for sockets with
+ <varname>Accept=no</varname>. It
+ defaults to the service that bears the
+ same name as the socket (with the
+ suffix replaced). In most cases it
+ should not be necessary to use this
+ option.</para></listitem>
</varlistentry>
</variablelist>

View File

@ -0,0 +1,119 @@
From 3d2c847396cf348ef1ee55f5d4211045a6202efc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 30 Dec 2013 13:00:38 -0500
Subject: [PATCH] tmpfiles: rename --unsafe to --boot
As suggested by Kay, it is better to describe what is done,
not what might happen.
---
man/systemd-tmpfiles.xml | 2 +-
man/tmpfiles.d.xml | 4 ++--
src/tmpfiles/tmpfiles.c | 14 +++++++-------
units/systemd-tmpfiles-setup.service.in | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
index c678031..64f9cf9 100644
--- a/man/systemd-tmpfiles.xml
+++ b/man/systemd-tmpfiles.xml
@@ -133,7 +133,7 @@
removed.</para></listitem>
</varlistentry>
<varlistentry>
- <term><option>--unsafe</option></term>
+ <term><option>--boot</option></term>
<listitem><para>Also execute lines
with an exclamation mark.
</para></listitem>
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index ed88751..8267ffc 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -273,7 +273,7 @@ L /tmp/foobar - - - - /dev/null</programlisting>
execute at any time, e.g. on package upgrades.
<command>systemd-tmpfiles</command> will
execute line with an exclamation mark only if
- option <option>--unsafe</option> is given.
+ option <option>--boot</option> is given.
</para>
<para>For example:
@@ -286,7 +286,7 @@ r! /tmp/.X[0-9]*-lock
</programlisting>
The second line in contrast to the first one
would break a running system, and will only be
- executed with <option>--unsafe</option>.</para>
+ executed with <option>--boot</option>.</para>
</refsect2>
<refsect2>
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 30a8a55..4dd1638 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -106,7 +106,7 @@ static Set *unix_sockets = NULL;
static bool arg_create = false;
static bool arg_clean = false;
static bool arg_remove = false;
-static bool arg_unsafe = false;
+static bool arg_boot = false;
static char **include_prefixes = NULL;
static char **exclude_prefixes = NULL;
@@ -1100,7 +1100,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
if (strlen(action) > 2 || (strlen(action) > 1 && action[1] != '!')) {
log_error("[%s:%u] Unknown modifier '%s'", fname, line, action);
return -EINVAL;
- } else if (strlen(action) > 1 && !arg_unsafe)
+ } else if (strlen(action) > 1 && !arg_boot)
return 0;
type = action[0];
@@ -1275,7 +1275,7 @@ static int help(void) {
" --create Create marked files/directories\n"
" --clean Clean up marked directories\n"
" --remove Remove marked files/directories\n"
- " --unsafe Execute actions only safe at boot\n"
+ " --boot Execute actions only safe at boot\n"
" --prefix=PATH Only apply rules that apply to paths with the specified prefix\n"
" --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n",
program_invocation_short_name);
@@ -1289,7 +1289,7 @@ static int parse_argv(int argc, char *argv[]) {
ARG_CREATE,
ARG_CLEAN,
ARG_REMOVE,
- ARG_UNSAFE,
+ ARG_BOOT,
ARG_PREFIX,
ARG_EXCLUDE_PREFIX,
};
@@ -1299,7 +1299,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "create", no_argument, NULL, ARG_CREATE },
{ "clean", no_argument, NULL, ARG_CLEAN },
{ "remove", no_argument, NULL, ARG_REMOVE },
- { "unsafe", no_argument, NULL, ARG_UNSAFE },
+ { "boot", no_argument, NULL, ARG_BOOT },
{ "prefix", required_argument, NULL, ARG_PREFIX },
{ "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX },
{ NULL, 0, NULL, 0 }
@@ -1330,8 +1330,8 @@ static int parse_argv(int argc, char *argv[]) {
arg_remove = true;
break;
- case ARG_UNSAFE:
- arg_unsafe = true;
+ case ARG_BOOT:
+ arg_boot = true;
break;
case ARG_PREFIX:
diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in
index c2dcae0..01043b7 100644
--- a/units/systemd-tmpfiles-setup.service.in
+++ b/units/systemd-tmpfiles-setup.service.in
@@ -24,4 +24,4 @@ RefuseManualStop=yes
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --unsafe --exclude-prefix=/dev
+ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev

View File

@ -0,0 +1,47 @@
From ba087745bca7eea8f62cc529c3e6c5eaf6bf2904 Mon Sep 17 00:00:00 2001
From: Stefan Beller <stefanbeller@googlemail.com>
Date: Mon, 30 Dec 2013 17:43:52 +0100
Subject: [PATCH] sleep-config: Dereference pointer before check for NULL
This fixes a bug pointed out by http://css.csail.mit.edu/stack/
(Optimization-unstable code)
It is a similar fix as f146f5e159 (2013-12-30, core:
Forgot to dereference pointer when checking for NULL)
To explain this bug consider the following similar, but simpler code:
if (!p)
free(*p)
Assume the if condition evaluates to true, then we will access *p,
which means the compiler can assume p is a valid pointer, so it could
dereference p and use the value *p.
Assuming p as a valid pointer, !p will be false.
But initally we assumed the condition evaluates to true.
By this reasoning the optimizing compiler can deduce, we have dead code.
("The if will never be taken, as *p must be valid, because otherwise
accessing *p inside the if would segfault")
This led to an error message of the static code checker, so I checked the
code in question.
As we access *modes and *states before the check in the changed line of
this patch, I assume the line to be wrong and we actually wanted to check
for *modes and *states being both non null.
---
src/shared/sleep-config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index d76e3ad..b2a0787 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -94,7 +94,7 @@ int parse_sleep_config(const char *verb, char ***modes, char ***states) {
} else
assert_not_reached("what verb");
- if (!modes || !states) {
+ if (!*modes || !*states) {
strv_free(*modes);
strv_free(*states);
return log_oom();

View File

@ -0,0 +1,99 @@
From e8d2aa2c8d3533a2dc6f0db5ed22453a16bcf1ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 31 Dec 2013 11:23:58 -0500
Subject: [PATCH] sleep-config: fix double free
Before 34a3baa4d 'sleep-config: Dereference pointer before check for NULL'
oom conditions would not be detected properly. After that commit, a double
free was performed.
Rework the whole function to be easier to understand, and also replace
strv_split_nulstr with strv_new, since we know the strings anyway.
---
src/shared/sleep-config.c | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index b2a0787..70a0896 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -28,11 +28,14 @@
#include "strv.h"
#include "util.h"
-int parse_sleep_config(const char *verb, char ***modes, char ***states) {
+#define USE(x, y) do{ (x) = (y); (y) = NULL; } while(0)
+
+int parse_sleep_config(const char *verb, char ***_modes, char ***_states) {
_cleanup_strv_free_ char
**suspend_mode = NULL, **suspend_state = NULL,
**hibernate_mode = NULL, **hibernate_state = NULL,
**hybrid_mode = NULL, **hybrid_state = NULL;
+ char **modes, **states;
const ConfigTableItem items[] = {
{ "Sleep", "SuspendMode", config_parse_strv, 0, &suspend_mode },
@@ -59,47 +62,46 @@ int parse_sleep_config(const char *verb, char ***modes, char ***states) {
if (streq(verb, "suspend")) {
/* empty by default */
- *modes = suspend_mode;
+ USE(modes, suspend_mode);
if (suspend_state)
- *states = suspend_state;
+ USE(states, suspend_state);
else
- *states = strv_split_nulstr("mem\0standby\0freeze\0");
+ states = strv_new("mem", "standby", "freeze", NULL);
- suspend_mode = suspend_state = NULL;
} else if (streq(verb, "hibernate")) {
if (hibernate_mode)
- *modes = hibernate_mode;
+ USE(modes, hibernate_mode);
else
- *modes = strv_split_nulstr("platform\0shutdown\0");
+ modes = strv_new("platform", "shutdown", NULL);
if (hibernate_state)
- *states = hibernate_state;
+ USE(states, hibernate_state);
else
- *states = strv_split_nulstr("disk\0");
+ states = strv_new("disk", NULL);
- hibernate_mode = hibernate_state = NULL;
} else if (streq(verb, "hybrid-sleep")) {
if (hybrid_mode)
- *modes = hybrid_mode;
+ USE(modes, hybrid_mode);
else
- *modes = strv_split_nulstr("suspend\0platform\0shutdown\0");
+ modes = strv_new("suspend", "platform", "shutdown", NULL);
if (hybrid_state)
- *states = hybrid_state;
+ USE(states, hybrid_state);
else
- *states = strv_split_nulstr("disk\0");
+ states = strv_new("disk", NULL);
- hybrid_mode = hybrid_state = NULL;
} else
assert_not_reached("what verb");
- if (!*modes || !*states) {
- strv_free(*modes);
- strv_free(*states);
+ if ((!modes && !streq(verb, "suspend")) || !states) {
+ strv_free(modes);
+ strv_free(states);
return log_oom();
}
+ *_modes = modes;
+ *_states = states;
return 0;
}

View File

@ -0,0 +1,33 @@
From eb882aa36d9c700b7b5469df3f2bf43092d5c68b Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Fri, 3 Jan 2014 01:32:03 +0100
Subject: [PATCH] rules: drivers - do not reset RUN list
---
rules/80-drivers.rules | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules
index 0b22d73..8551f47 100644
--- a/rules/80-drivers.rules
+++ b/rules/80-drivers.rules
@@ -2,12 +2,12 @@
ACTION=="remove", GOTO="drivers_end"
-ENV{MODALIAS}=="?*", RUN{builtin}="kmod load $env{MODALIAS}"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms"
-SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block"
-SUBSYSTEM=="i2o", RUN{builtin}="kmod load i2o_block"
-SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}="kmod load ppdev"
-KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}="kmod load sm_ftl"
+ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load $env{MODALIAS}"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}+="kmod load tifm_sd"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}+="kmod load tifm_ms"
+SUBSYSTEM=="memstick", RUN{builtin}+="kmod load ms_block mspro_block"
+SUBSYSTEM=="i2o", RUN{builtin}+="kmod load i2o_block"
+SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}+="kmod load ppdev"
+KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}+="kmod load sm_ftl"
LABEL="drivers_end"

View File

@ -0,0 +1,45 @@
From 0e09a7e4c14e6b1d31a9a56b80d02b52c9583ab1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 27 Dec 2013 22:12:38 -0500
Subject: [PATCH] core/manager: print info about interesting signals
Information about signals which are not routinely received by systemd
are printed at info level. This should make it easier to see what is
happening in the system.
---
src/core/manager.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index a34a3c6..69ad4b5 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1435,16 +1435,22 @@ static int manager_process_signal_fd(Manager *m) {
}
if (sfsi.ssi_pid > 0) {
- char *p = NULL;
+ _cleanup_free_ char *p = NULL;
get_process_comm(sfsi.ssi_pid, &p);
- log_debug("Received SIG%s from PID %lu (%s).",
- signal_to_string(sfsi.ssi_signo),
- (unsigned long) sfsi.ssi_pid, strna(p));
- free(p);
+ log_full(sfsi.ssi_signo == SIGCHLD ||
+ (sfsi.ssi_signo == SIGTERM && m->running_as == SYSTEMD_USER)
+ ? LOG_DEBUG : LOG_INFO,
+ "Received SIG%s from PID %lu (%s).",
+ signal_to_string(sfsi.ssi_signo),
+ (unsigned long) sfsi.ssi_pid, strna(p));
} else
- log_debug("Received SIG%s.", signal_to_string(sfsi.ssi_signo));
+ log_full(sfsi.ssi_signo == SIGCHLD ||
+ (sfsi.ssi_signo == SIGTERM && m->running_as == SYSTEMD_USER)
+ ? LOG_DEBUG : LOG_INFO,
+ "Received SIG%s.",
+ signal_to_string(sfsi.ssi_signo));
switch (sfsi.ssi_signo) {

View File

@ -0,0 +1,26 @@
From d4466e04783415eee7eec269104e60ab1f6b4b50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 30 Dec 2013 11:21:56 -0500
Subject: [PATCH] core/service: check if mainpid matches only if it is set
https://bugzilla.redhat.com/show_bug.cgi?id=1047304
Conflicts:
src/core/service.c
---
src/core/service.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/service.c b/src/core/service.c
index 62ae8f0..f0acda1 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -3400,7 +3400,7 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) {
return;
}
- if (s->notify_access == NOTIFY_MAIN && pid != s->main_pid) {
+ if (s->notify_access == NOTIFY_MAIN && s->main_pid != 0 && pid != s->main_pid) {
log_warning_unit(u->id,
"%s: Got notification message from PID %lu, but reception only permitted for PID %lu",
u->id, (unsigned long) pid, (unsigned long) s->main_pid);

22
0219-man-typo-fix.patch Normal file
View File

@ -0,0 +1,22 @@
From dfb3a987b160406fb4cf6cc3935cf54571d7c373 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date: Sat, 4 Jan 2014 23:21:13 +0100
Subject: [PATCH] man: typo fix
---
man/systemd.time.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/systemd.time.xml b/man/systemd.time.xml
index f438fa5..a837f23 100644
--- a/man/systemd.time.xml
+++ b/man/systemd.time.xml
@@ -222,7 +222,7 @@
<para>In the date and time specifications, any
component may be specified as <literal>*</literal> in
which case any value will match. Alternatively, each
- component can be specified as list of values separated
+ component can be specified as a list of values separated
by commas. Values may also be suffixed with
<literal>/</literal> and a repetition value, which
indicates that the value and all values plus multiples

View File

@ -0,0 +1,29 @@
From d61f36a7ef07c252b49cc8015fe37b69bffb1a35 Mon Sep 17 00:00:00 2001
From: Stefan Beller <stefanbeller@googlemail.com>
Date: Fri, 3 Jan 2014 20:33:20 +0100
Subject: [PATCH] swap: remove if/else with the same data path
This was introduced in e1770af812 (2012-02-03, swap: replace failure
boolean by result enum).
This just removes unneeded lines of code, no functional change.
---
src/core/swap.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/core/swap.c b/src/core/swap.c
index f295b65..727bb95 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -959,10 +959,7 @@ static void swap_sigchld_event(Unit *u, pid_t pid, int code, int status) {
case SWAP_DEACTIVATING_SIGKILL:
case SWAP_DEACTIVATING_SIGTERM:
- if (f == SWAP_SUCCESS)
- swap_enter_dead(s, f);
- else
- swap_enter_dead(s, f);
+ swap_enter_dead(s, f);
break;
default:

769
0221-hwdb-update.patch Normal file
View File

@ -0,0 +1,769 @@
From 3c8008b94726f3812ac28f4a33db61635323ee6a Mon Sep 17 00:00:00 2001
From: Marcel Holtmann <marcel@holtmann.org>
Date: Sun, 5 Jan 2014 00:44:34 -0800
Subject: [PATCH] hwdb: update
Conflicts:
hwdb/20-sdio-vendor-model.hwdb
---
hwdb/20-OUI.hwdb | 97 +++++++++++++++++++++++++-
hwdb/20-pci-vendor-model.hwdb | 154 ++++++++++++++++++++++++++++++++++++++----
hwdb/20-usb-vendor-model.hwdb | 6 ++
3 files changed, 241 insertions(+), 16 deletions(-)
diff --git a/hwdb/20-OUI.hwdb b/hwdb/20-OUI.hwdb
index 92b96ae..a51a00a 100644
--- a/hwdb/20-OUI.hwdb
+++ b/hwdb/20-OUI.hwdb
@@ -13627,6 +13627,12 @@ OUI:40D8551E2*
OUI:40D8551E3*
ID_OUI_FROM_DATABASE=Mega Electronics Ltd
+OUI:40D8551E4*
+ ID_OUI_FROM_DATABASE=STEK Ltd
+
+OUI:40D855EE6*
+ ID_OUI_FROM_DATABASE=Narinet, Inc.
+
OUI:000000*
ID_OUI_FROM_DATABASE=XEROX CORPORATION
@@ -35222,7 +35228,7 @@ OUI:001C4C*
ID_OUI_FROM_DATABASE=Petrotest Instruments
OUI:001C4D*
- ID_OUI_FROM_DATABASE=Zeemote Technology Inc. (part of Aplix).
+ ID_OUI_FROM_DATABASE=Aplix IP Holdings Corporation
OUI:001C4E*
ID_OUI_FROM_DATABASE=TASA International Limited
@@ -52606,6 +52612,9 @@ OUI:08D42B*
OUI:08D5C0*
ID_OUI_FROM_DATABASE=Seers Technology Co., Ltd
+OUI:08D833*
+ ID_OUI_FROM_DATABASE=Shenzhen RF Technology Co,.Ltd
+
OUI:08E5DA*
ID_OUI_FROM_DATABASE=NANJING FUJITSU COMPUTER PRODUCTS CO.,LTD.
@@ -53308,6 +53317,9 @@ OUI:1423D7*
OUI:142BD2*
ID_OUI_FROM_DATABASE=Armtel Ltd.
+OUI:142D27*
+ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+
OUI:142D8B*
ID_OUI_FROM_DATABASE=Incipio Technologies, Inc
@@ -53761,6 +53773,9 @@ OUI:18C451*
OUI:18C8E7*
ID_OUI_FROM_DATABASE=Shenzhen Hualistone Technology Co.,Ltd
+OUI:18CC23*
+ ID_OUI_FROM_DATABASE=Philio Technology Corporation
+
OUI:18D071*
ID_OUI_FROM_DATABASE=DASAN SMC, Inc.
@@ -54688,6 +54703,9 @@ OUI:2838CF*
OUI:2839E7*
ID_OUI_FROM_DATABASE=Preceno Technology Pte.Ltd.
+OUI:283B96*
+ ID_OUI_FROM_DATABASE=Cool Control LTD
+
OUI:283CE4*
ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
@@ -54907,6 +54925,9 @@ OUI:28E14C*
OUI:28E297*
ID_OUI_FROM_DATABASE=Shanghai InfoTM Microelectronics Co.,Ltd.
+OUI:28E347*
+ ID_OUI_FROM_DATABASE=Liteon Technology Corporation
+
OUI:28E608*
ID_OUI_FROM_DATABASE=Tokheim
@@ -55717,6 +55738,9 @@ OUI:34E0CF*
OUI:34E0D7*
ID_OUI_FROM_DATABASE=DONGGUAN QISHENG ELECTRONICS INDUSTRIAL CO., LTD
+OUI:34E2FD*
+ ID_OUI_FROM_DATABASE=Apple
+
OUI:34EF44*
ID_OUI_FROM_DATABASE=2Wire
@@ -56023,6 +56047,9 @@ OUI:3C1040*
OUI:3C106F*
ID_OUI_FROM_DATABASE=ALBAHITH TECHNOLOGIES
+OUI:3C15C2*
+ ID_OUI_FROM_DATABASE=Apple
+
OUI:3C15EA*
ID_OUI_FROM_DATABASE=TESCOM CO., LTD.
@@ -56227,6 +56254,9 @@ OUI:3CC99E*
OUI:3CCA87*
ID_OUI_FROM_DATABASE=Iders Incorporated
+OUI:3CCD93*
+ ID_OUI_FROM_DATABASE=LG ELECTRONICS INC
+
OUI:3CCE73*
ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
@@ -56408,7 +56438,7 @@ OUI:40667A*
ID_OUI_FROM_DATABASE=mediola - connected living AG
OUI:406826*
- ID_OUI_FROM_DATABASE=Thales Optronics Limited
+ ID_OUI_FROM_DATABASE=Thales UK Limited
OUI:406AAB*
ID_OUI_FROM_DATABASE=RIM
@@ -57436,6 +57466,9 @@ OUI:5048EB*
OUI:504A5E*
ID_OUI_FROM_DATABASE=Masimo Corporation
+OUI:504A6E*
+ ID_OUI_FROM_DATABASE=NETGEAR INC.,
+
OUI:504F94*
ID_OUI_FROM_DATABASE=Loxone Electronics GmbH
@@ -58480,6 +58513,9 @@ OUI:6045BD*
OUI:604616*
ID_OUI_FROM_DATABASE=XIAMEN VANN INTELLIGENT CO., LTD
+OUI:6047D4*
+ ID_OUI_FROM_DATABASE=FORICS Electronic Technology Co., Ltd.
+
OUI:604A1C*
ID_OUI_FROM_DATABASE=SUYIN Corporation
@@ -58630,6 +58666,9 @@ OUI:60D30A*
OUI:60D819*
ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+OUI:60D9C7*
+ ID_OUI_FROM_DATABASE=Apple
+
OUI:60DA23*
ID_OUI_FROM_DATABASE=Estech Co.,Ltd
@@ -58849,6 +58888,9 @@ OUI:6473E2*
OUI:647657*
ID_OUI_FROM_DATABASE=Innovative Security Designs
+OUI:6476BA*
+ ID_OUI_FROM_DATABASE=Apple
+
OUI:647791*
ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
@@ -58882,6 +58924,9 @@ OUI:6487D7*
OUI:6488FF*
ID_OUI_FROM_DATABASE=Sichuan Changhong Electric Ltd.
+OUI:648D9E*
+ ID_OUI_FROM_DATABASE=IVT Electronic Co.,Ltd
+
OUI:64995D*
ID_OUI_FROM_DATABASE=LGE
@@ -59161,6 +59206,9 @@ OUI:687924*
OUI:6879ED*
ID_OUI_FROM_DATABASE=SHARP Corporation
+OUI:687CC8*
+ ID_OUI_FROM_DATABASE=Measurement Systems S. de R.L.
+
OUI:687CD5*
ID_OUI_FROM_DATABASE=Y Soft Corporation, a.s.
@@ -59425,6 +59473,9 @@ OUI:6C6F18*
OUI:6C7039*
ID_OUI_FROM_DATABASE=Novar GmbH
+OUI:6C709F*
+ ID_OUI_FROM_DATABASE=Apple
+
OUI:6C71D9*
ID_OUI_FROM_DATABASE=AzureWave Technologies, Inc
@@ -59779,6 +59830,9 @@ OUI:708B78*
OUI:708D09*
ID_OUI_FROM_DATABASE=Nokia Corporation
+OUI:709383*
+ ID_OUI_FROM_DATABASE=Intelligent Optical Network High Tech CO.,LTD.
+
OUI:7093F8*
ID_OUI_FROM_DATABASE=Space Monkey, Inc.
@@ -60166,6 +60220,9 @@ OUI:74F612*
OUI:74F726*
ID_OUI_FROM_DATABASE=Neuron Robotics
+OUI:74F85D*
+ ID_OUI_FROM_DATABASE=Berkeley Nucleonics Corp
+
OUI:74FDA0*
ID_OUI_FROM_DATABASE=Compupal (Group) Corporation
@@ -60862,6 +60919,9 @@ OUI:7CFADF*
OUI:7CFE28*
ID_OUI_FROM_DATABASE=Salutron Inc.
+OUI:7CFF62*
+ ID_OUI_FROM_DATABASE=Huizhou Super Electron Technology Co.,Ltd.
+
OUI:80000B*
ID_OUI_FROM_DATABASE=Intel Corporate
@@ -61105,6 +61165,9 @@ OUI:80D019*
OUI:80D18B*
ID_OUI_FROM_DATABASE=Hangzhou I'converge Technology Co.,Ltd
+OUI:80D433*
+ ID_OUI_FROM_DATABASE=LzLabs GmbH
+
OUI:80D733*
ID_OUI_FROM_DATABASE=QSR Automations, Inc.
@@ -61336,6 +61399,9 @@ OUI:84ACA4*
OUI:84AF1F*
ID_OUI_FROM_DATABASE=Beat System Service Co,. Ltd.
+OUI:84B59C*
+ ID_OUI_FROM_DATABASE=Juniper networks
+
OUI:84C2E4*
ID_OUI_FROM_DATABASE=Jiangsu Qinheng Co., Ltd.
@@ -61402,6 +61468,9 @@ OUI:880355*
OUI:880905*
ID_OUI_FROM_DATABASE=MTMCommunications
+OUI:880FB6*
+ ID_OUI_FROM_DATABASE=Jabil Circuits India Pvt Ltd,-EHTP unit
+
OUI:881036*
ID_OUI_FROM_DATABASE=Panodic(ShenZhen) Electronics Limted
@@ -62605,6 +62674,9 @@ OUI:983000*
OUI:983071*
ID_OUI_FROM_DATABASE=DAIKYUNG VASCOM
+OUI:98349D*
+ ID_OUI_FROM_DATABASE=Krauss Maffei Technologies GmbH
+
OUI:983571*
ID_OUI_FROM_DATABASE=Sub10 Systems Ltd
@@ -63061,6 +63133,9 @@ OUI:9CCAD9*
OUI:9CCD82*
ID_OUI_FROM_DATABASE=CHENG UEI PRECISION INDUSTRY CO.,LTD
+OUI:9CD21E*
+ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+
OUI:9CD24B*
ID_OUI_FROM_DATABASE=zte corporation
@@ -63358,6 +63433,9 @@ OUI:A0CEC8*
OUI:A0CF5B*
ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
+OUI:A0D12A*
+ ID_OUI_FROM_DATABASE=AXPRO Technology Inc.
+
OUI:A0D3C1*
ID_OUI_FROM_DATABASE=Hewlett Packard
@@ -64366,6 +64444,9 @@ OUI:B05B1F*
OUI:B05CE5*
ID_OUI_FROM_DATABASE=Nokia Corporation
+OUI:B061C7*
+ ID_OUI_FROM_DATABASE=Ericsson-LG Enterprise
+
OUI:B06563*
ID_OUI_FROM_DATABASE=Shanghai Railway Communication Factory
@@ -64684,6 +64765,9 @@ OUI:B46293*
OUI:B462AD*
ID_OUI_FROM_DATABASE=raytest GmbH
+OUI:B46698*
+ ID_OUI_FROM_DATABASE=Zealabs srl
+
OUI:B467E9*
ID_OUI_FROM_DATABASE=Qingdao GoerTek Technology Co., Ltd.
@@ -65590,6 +65674,9 @@ OUI:C098E5*
OUI:C09C92*
ID_OUI_FROM_DATABASE=COBY
+OUI:C09D26*
+ ID_OUI_FROM_DATABASE=Topicon HK Lmd.
+
OUI:C09F42*
ID_OUI_FROM_DATABASE=Apple
@@ -65833,6 +65920,9 @@ OUI:C45DD8*
OUI:C46044*
ID_OUI_FROM_DATABASE=Everex Electronics Limited
+OUI:C4626B*
+ ID_OUI_FROM_DATABASE=ZPT Vigantice
+
OUI:C462EA*
ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
@@ -68605,6 +68695,9 @@ OUI:EC14F6*
OUI:EC172F*
ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO., LTD.
+OUI:EC1766*
+ ID_OUI_FROM_DATABASE=Research Centre Module
+
OUI:EC1A59*
ID_OUI_FROM_DATABASE=Belkin International Inc.
diff --git a/hwdb/20-pci-vendor-model.hwdb b/hwdb/20-pci-vendor-model.hwdb
index 6142dc8..7f833e3 100644
--- a/hwdb/20-pci-vendor-model.hwdb
+++ b/hwdb/20-pci-vendor-model.hwdb
@@ -4166,6 +4166,9 @@ pci:v00001002d00006600*
pci:v00001002d00006601*
ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8730M]
+pci:v00001002d00006601sv0000103Csd00002100*
+ ID_MODEL_FROM_DATABASE=FirePro M4100
+
pci:v00001002d00006602*
ID_MODEL_FROM_DATABASE=Mars
@@ -4185,10 +4188,22 @@ pci:v00001002d00006607*
ID_MODEL_FROM_DATABASE=Mars LE [Radeon HD 8530M]
pci:v00001002d00006610*
- ID_MODEL_FROM_DATABASE=Oland XT [Radeon HD 8670/R7 250]
+ ID_MODEL_FROM_DATABASE=Oland XT [Radeon HD 8670 / R7 250]
pci:v00001002d00006611*
- ID_MODEL_FROM_DATABASE=Oland [Radeon HD 8570]
+ ID_MODEL_FROM_DATABASE=Oland [Radeon HD 8570 / R7 240 OEM]
+
+pci:v00001002d00006611sv00001028sd0000210B*
+ ID_MODEL_FROM_DATABASE=Radeon R5 240 OEM
+
+pci:v00001002d00006611sv0000174Bsd00004248*
+ ID_MODEL_FROM_DATABASE=Radeon R7 240 OEM
+
+pci:v00001002d00006611sv0000174Bsd0000A240*
+ ID_MODEL_FROM_DATABASE=Radeon R7 240 OEM
+
+pci:v00001002d00006611sv00001B0Asd000090D3*
+ ID_MODEL_FROM_DATABASE=Radeon R7 240 OEM
pci:v00001002d00006613*
ID_MODEL_FROM_DATABASE=Oland PRO [Radeon R7 240]
@@ -4224,7 +4239,7 @@ pci:v00001002d00006658*
ID_MODEL_FROM_DATABASE=Bonaire XTX [Radeon R7 260X]
pci:v00001002d0000665C*
- ID_MODEL_FROM_DATABASE=Bonaire XT [Radeon HD 7790/8770]
+ ID_MODEL_FROM_DATABASE=Bonaire XT [Radeon HD 7790/8770 / R9 260 OEM]
pci:v00001002d0000665Csv00001043sd00000452*
ID_MODEL_FROM_DATABASE=Radeon HD 7790 DirectCU II OC
@@ -4235,6 +4250,12 @@ pci:v00001002d0000665Csv00001462sd00002930*
pci:v00001002d0000665Csv00001462sd00002932*
ID_MODEL_FROM_DATABASE=Radeon HD 8770
+pci:v00001002d0000665Csv00001462sd00002934*
+ ID_MODEL_FROM_DATABASE=Radeon R9 260 OEM
+
+pci:v00001002d0000665Csv0000148Csd00009260*
+ ID_MODEL_FROM_DATABASE=Radeon R9 260 OEM
+
pci:v00001002d0000665Csv00001682sd00003310*
ID_MODEL_FROM_DATABASE=Radeon HD 7790 Black Edition 2 GB
@@ -4817,9 +4838,21 @@ pci:v00001002d00006742sv0000148Csd00006570*
pci:v00001002d00006742sv00001682sd00006570*
ID_MODEL_FROM_DATABASE=Turks [Radeon HD 6570]
+pci:v00001002d00006742sv0000174Bsd00005570*
+ ID_MODEL_FROM_DATABASE=Turks [Radeon HD 5570]
+
pci:v00001002d00006742sv0000174Bsd00006570*
ID_MODEL_FROM_DATABASE=Turks [Radeon HD 6570]
+pci:v00001002d00006742sv0000174Bsd00007570*
+ ID_MODEL_FROM_DATABASE=Turks [Radeon HD 7570]
+
+pci:v00001002d00006742sv0000174Bsd00008510*
+ ID_MODEL_FROM_DATABASE=Turks [Radeon HD 8510]
+
+pci:v00001002d00006742sv0000174Bsd00008570*
+ ID_MODEL_FROM_DATABASE=Turks [Radeon HD 8570]
+
pci:v00001002d00006742sv00001787sd00006570*
ID_MODEL_FROM_DATABASE=Turks [Radeon HD 6570]
@@ -5541,13 +5574,13 @@ pci:v00001002d00006770sv000017AAsd00003658*
ID_MODEL_FROM_DATABASE=Radeon HD 7470A
pci:v00001002d00006771*
- ID_MODEL_FROM_DATABASE=Caicos XTX [Radeon HD 8490]
+ ID_MODEL_FROM_DATABASE=Caicos XTX [Radeon HD 8490 / R5 235X OEM]
pci:v00001002d00006772*
ID_MODEL_FROM_DATABASE=Caicos [Radeon HD 7450A]
pci:v00001002d00006778*
- ID_MODEL_FROM_DATABASE=Caicos XT [Radeon HD 7470/8470]
+ ID_MODEL_FROM_DATABASE=Caicos XT [Radeon HD 7470/8470 / R5 235 OEM]
pci:v00001002d00006778sv00001019sd00000024*
ID_MODEL_FROM_DATABASE=Radeon HD 7470
@@ -5580,7 +5613,7 @@ pci:v00001002d00006778sv0000174Bsd0000E145*
ID_MODEL_FROM_DATABASE=Radeon HD 7470
pci:v00001002d00006779*
- ID_MODEL_FROM_DATABASE=Caicos [Radeon HD 6450/7450/8450]
+ ID_MODEL_FROM_DATABASE=Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]
pci:v00001002d00006779sv00001019sd00000016*
ID_MODEL_FROM_DATABASE=Radeon HD 6450
@@ -5979,7 +6012,7 @@ pci:v00001002d00006831*
ID_MODEL_FROM_DATABASE=Cape Verde [AMD Radeon HD 7700M Series]
pci:v00001002d00006835*
- ID_MODEL_FROM_DATABASE=Cape Verde PRX [Radeon R7 260]
+ ID_MODEL_FROM_DATABASE=Cape Verde PRX [Radeon R9 255 OEM]
pci:v00001002d00006837*
ID_MODEL_FROM_DATABASE=Cape Verde LE [Radeon HD 7730/8730]
@@ -8967,7 +9000,7 @@ pci:v00001002d0000999C*
ID_MODEL_FROM_DATABASE=Richland
pci:v00001002d0000999D*
- ID_MODEL_FROM_DATABASE=Richland
+ ID_MODEL_FROM_DATABASE=Richland [Radeon HD 8550D]
pci:v00001002d000099A0*
ID_MODEL_FROM_DATABASE=Trinity [Radeon HD 7520G]
@@ -17663,6 +17696,9 @@ pci:v0000109Ed0000036Esv00001461sd00000761*
pci:v0000109Ed0000036Esv00001461sd00000771*
ID_MODEL_FROM_DATABASE=AverMedia AVerTV DVB-T 771
+pci:v0000109Ed0000036Esv00001464sd0000AA00*
+ ID_MODEL_FROM_DATABASE=iTuner Spectra8
+
pci:v0000109Ed0000036Esv000014F1sd00000001*
ID_MODEL_FROM_DATABASE=Bt878 Mediastream Controller NTSC
@@ -27503,6 +27539,9 @@ pci:v000010ECd00005209*
pci:v000010ECd00005227*
ID_MODEL_FROM_DATABASE=RTS5227 PCI Express Card Reader
+pci:v000010ECd00005227sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v000010ECd00005229*
ID_MODEL_FROM_DATABASE=RTS5229 PCI Express Card Reader
@@ -48170,9 +48209,18 @@ pci:v0000168Cd00000033*
pci:v0000168Cd00000034*
ID_MODEL_FROM_DATABASE=AR9462 Wireless Network Adapter
+pci:v0000168Cd00000034sv00001A56sd00002003*
+ ID_MODEL_FROM_DATABASE=Killer Wireless-N 1202 Half-size Mini PCIe Card
+
pci:v0000168Cd00000036*
ID_MODEL_FROM_DATABASE=QCA9565 / AR9565 Wireless Network Adapter
+pci:v0000168Cd00000037*
+ ID_MODEL_FROM_DATABASE=AR9485 Wireless Network Adapter
+
+pci:v0000168Cd00000037sv00001A3Bsd00002100*
+ ID_MODEL_FROM_DATABASE=AW-NB100H 802.11n Wireless Mini PCIe Card
+
pci:v0000168Cd0000003C*
ID_MODEL_FROM_DATABASE=QCA988x 802.11ac Wireless Network Adapter
@@ -48191,6 +48239,9 @@ pci:v0000168Cd00009013*
pci:v0000168Cd0000FF19*
ID_MODEL_FROM_DATABASE=AR5006X Wireless Network Adapter
+pci:v0000168Cd0000FF1B*
+ ID_MODEL_FROM_DATABASE=AR2425 Wireless Network Adapter [AR5007EG 802.11bg]
+
pci:v0000168Cd0000FF1C*
ID_MODEL_FROM_DATABASE=AR5008 Wireless Network Adapter
@@ -49406,6 +49457,9 @@ pci:v00001814d00003298sv0000103Csd000018EC*
pci:v00001814d00003592*
ID_MODEL_FROM_DATABASE=RT3592 Wireless 802.11abgn 2T/2R PCIe
+pci:v00001814d0000359F*
+ ID_MODEL_FROM_DATABASE=RT3592 PCIe Wireless Network Adapter
+
pci:v00001814d00005360*
ID_MODEL_FROM_DATABASE=RT5360 Wireless 802.11n 1T/1R
@@ -49421,6 +49475,9 @@ pci:v00001814d00005390*
pci:v00001814d00005390sv0000103Csd00001636*
ID_MODEL_FROM_DATABASE=U98Z077.00 Half-size Mini PCIe Card
+pci:v00001814d00005392*
+ ID_MODEL_FROM_DATABASE=RT5392 PCIe Wireless Network Adapter
+
pci:v00001814d0000539F*
ID_MODEL_FROM_DATABASE=RT5390 [802.11 b/g/n 1T1R G-band PCI Express Single Chip]
@@ -50585,6 +50642,12 @@ pci:v00001957d00000087*
pci:v00001957d000000B4*
ID_MODEL_FROM_DATABASE=MPC8315E
+pci:v00001957d000000B6*
+ ID_MODEL_FROM_DATABASE=MPC8314E
+
+pci:v00001957d000000B6sv00001A56sd00001101*
+ ID_MODEL_FROM_DATABASE=Killer Xeno Pro Gigabit Ethernet Controller
+
pci:v00001957d000000C2*
ID_MODEL_FROM_DATABASE=MPC8379E
@@ -50669,6 +50732,12 @@ pci:v00001957d00007011*
pci:v00001957d00007018*
ID_MODEL_FROM_DATABASE=MPC8610
+pci:v00001957d0000C006*
+ ID_MODEL_FROM_DATABASE=MPC8308
+
+pci:v00001957d0000C006sv00001A56sd00001201*
+ ID_MODEL_FROM_DATABASE=Killer E2100 Gigabit Ethernet Controller
+
pci:v00001958*
ID_VENDOR_FROM_DATABASE=Faster Technology, LLC.
@@ -54164,6 +54233,9 @@ pci:v00008086d00000412*
pci:v00008086d00000416*
ID_MODEL_FROM_DATABASE=4th Gen Core Processor Integrated Graphics Controller
+pci:v00008086d00000416sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d0000041A*
ID_MODEL_FROM_DATABASE=Xeon E3-1200 v3 Processor Integrated Graphics Controller
@@ -54680,9 +54752,15 @@ pci:v00008086d0000095Asv00008086sd00005000*
pci:v00008086d0000095Asv00008086sd00005002*
ID_MODEL_FROM_DATABASE=Wireless-N 7265
+pci:v00008086d0000095Asv00008086sd0000500A*
+ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
+
pci:v00008086d0000095Asv00008086sd00005010*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
+pci:v00008086d0000095Asv00008086sd00005012*
+ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
+
pci:v00008086d0000095Asv00008086sd00005020*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-N 7265
@@ -54695,6 +54773,9 @@ pci:v00008086d0000095Asv00008086sd00005090*
pci:v00008086d0000095Asv00008086sd00005110*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
+pci:v00008086d0000095Asv00008086sd00005190*
+ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
+
pci:v00008086d0000095Asv00008086sd00005400*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
@@ -54707,24 +54788,30 @@ pci:v00008086d0000095Asv00008086sd00005420*
pci:v00008086d0000095Asv00008086sd00005490*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
+pci:v00008086d0000095Asv00008086sd00005590*
+ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
+
pci:v00008086d0000095Asv00008086sd00009010*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
-pci:v00008086d0000095Asv00008086sd00009210*
+pci:v00008086d0000095Asv00008086sd00009110*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
-pci:v00008086d0000095Asv00008086sd00009410*
+pci:v00008086d0000095Asv00008086sd00009210*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
-pci:v00008086d0000095B*
- ID_MODEL_FROM_DATABASE=Wireless 7265
+pci:v00008086d0000095Asv00008086sd00009310*
+ ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
-pci:v00008086d0000095Bsv00008086sd0000500A*
+pci:v00008086d0000095Asv00008086sd00009410*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
-pci:v00008086d0000095Bsv00008086sd00005012*
+pci:v00008086d0000095Asv00008086sd00009510*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 7265
+pci:v00008086d0000095B*
+ ID_MODEL_FROM_DATABASE=Wireless 7265
+
pci:v00008086d0000095Bsv00008086sd00005200*
ID_MODEL_FROM_DATABASE=Dual Band Wireless-N 7265
@@ -54860,6 +54947,9 @@ pci:v00008086d00000C01*
pci:v00008086d00000C04*
ID_MODEL_FROM_DATABASE=Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller
+pci:v00008086d00000C04sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00000C05*
ID_MODEL_FROM_DATABASE=Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller
@@ -54872,6 +54962,9 @@ pci:v00008086d00000C09*
pci:v00008086d00000C0C*
ID_MODEL_FROM_DATABASE=Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
+pci:v00008086d00000C0Csv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00000C46*
ID_MODEL_FROM_DATABASE=Atom Processor S1200 PCI Express Root Port 1
@@ -57986,6 +58079,9 @@ pci:v00008086d00001539*
pci:v00008086d0000153A*
ID_MODEL_FROM_DATABASE=Ethernet Connection I217-LM
+pci:v00008086d0000153Asv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d0000153B*
ID_MODEL_FROM_DATABASE=Ethernet Connection I217-V
@@ -69035,6 +69131,9 @@ pci:v00008086d00008C02*
pci:v00008086d00008C03*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode]
+pci:v00008086d00008C03sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C04*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family SATA Controller 1 [RAID mode]
@@ -69062,12 +69161,18 @@ pci:v00008086d00008C0F*
pci:v00008086d00008C10*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family PCI Express Root Port #1
+pci:v00008086d00008C10sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C11*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family PCI Express Root Port #1
pci:v00008086d00008C12*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family PCI Express Root Port #2
+pci:v00008086d00008C12sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C13*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family PCI Express Root Port #2
@@ -69110,12 +69215,18 @@ pci:v00008086d00008C1F*
pci:v00008086d00008C20*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset High Definition Audio Controller
+pci:v00008086d00008C20sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C21*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset High Definition Audio Controller
pci:v00008086d00008C22*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family SMBus Controller
+pci:v00008086d00008C22sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C23*
ID_MODEL_FROM_DATABASE=8 Series Chipset Family CHAP Counters
@@ -69125,12 +69236,21 @@ pci:v00008086d00008C24*
pci:v00008086d00008C26*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family USB EHCI #1
+pci:v00008086d00008C26sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C2D*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family USB EHCI #2
+pci:v00008086d00008C2Dsv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C31*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family USB xHCI
+pci:v00008086d00008C31sv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C33*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family LAN Controller
@@ -69140,6 +69260,9 @@ pci:v00008086d00008C34*
pci:v00008086d00008C3A*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family MEI Controller #1
+pci:v00008086d00008C3Asv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C3B*
ID_MODEL_FROM_DATABASE=8 Series/C220 Series Chipset Family MEI Controller #2
@@ -69197,6 +69320,9 @@ pci:v00008086d00008C4E*
pci:v00008086d00008C4F*
ID_MODEL_FROM_DATABASE=QM87 Express LPC Controller
+pci:v00008086d00008C4Fsv000017AAsd0000220E*
+ ID_MODEL_FROM_DATABASE=ThinkPad T440p
+
pci:v00008086d00008C50*
ID_MODEL_FROM_DATABASE=B85 Express LPC Controller
diff --git a/hwdb/20-usb-vendor-model.hwdb b/hwdb/20-usb-vendor-model.hwdb
index 6663820..60dbcd2 100644
--- a/hwdb/20-usb-vendor-model.hwdb
+++ b/hwdb/20-usb-vendor-model.hwdb
@@ -46055,6 +46055,12 @@ usb:v1B5A*
usb:v1B65*
ID_VENDOR_FROM_DATABASE=The Hong Kong Standards and Testing Centre Ltd.
+usb:v1B71*
+ ID_VENDOR_FROM_DATABASE=Fushicai
+
+usb:v1B71p3002*
+ ID_MODEL_FROM_DATABASE=USBTV007 Video Grabber [EasyCAP]
+
usb:v1B72*
ID_VENDOR_FROM_DATABASE=ATERGI TECHNOLOGY CO., LTD.

View File

@ -0,0 +1,58 @@
From 43539d6b60ef0db3e98d00bef0024614c8c1807a Mon Sep 17 00:00:00 2001
From: George McCollister <george.mccollister@gmail.com>
Date: Tue, 31 Dec 2013 14:37:32 -0600
Subject: [PATCH] journal: Add missing byte order conversions
Convert entry_array.items[0] to host byte order prior to passing it to
chain_cache_put().
[zj: also use le64toh in journal-verify.c]
https://bugs.freedesktop.org/show_bug.cgi?id=73194
---
src/journal/journal-file.c | 4 ++--
src/journal/journal-verify.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 5ef6a2a..ba65464 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1452,7 +1452,7 @@ static int generic_array_get(
found:
/* Let's cache this item for the next invocation */
- chain_cache_put(f->chain_cache, ci, first, a, o->entry_array.items[0], t, i);
+ chain_cache_put(f->chain_cache, ci, first, a, le64toh(o->entry_array.items[0]), t, i);
r = journal_file_move_to_object(f, OBJECT_ENTRY, p, &o);
if (r < 0)
@@ -1685,7 +1685,7 @@ found:
return 0;
/* Let's cache this item for the next invocation */
- chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t, subtract_one ? (i > 0 ? i-1 : (uint64_t) -1) : i);
+ chain_cache_put(f->chain_cache, ci, first, a, le64toh(array->entry_array.items[0]), t, subtract_one ? (i > 0 ? i-1 : (uint64_t) -1) : i);
if (subtract_one && i == 0)
p = last_p;
diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c
index 3405811..82b0f0a 100644
--- a/src/journal/journal-verify.c
+++ b/src/journal/journal-verify.c
@@ -249,12 +249,12 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
}
for (i = 0; i < journal_file_entry_array_n_items(o); i++)
- if (o->entry_array.items[i] != 0 &&
- !VALID64(o->entry_array.items[i])) {
+ if (le64toh(o->entry_array.items[i]) != 0 &&
+ !VALID64(le64toh(o->entry_array.items[i]))) {
log_error(OFSfmt": invalid object entry array item (%"PRIu64"/%"PRIu64"): "OFSfmt,
offset,
i, journal_file_entry_array_n_items(o),
- o->entry_array.items[i]);
+ le64toh(o->entry_array.items[i]));
return -EBADMSG;
}

View File

@ -0,0 +1,39 @@
From c47bbfc9af040f1b0fce2edced4136ee921d9e70 Mon Sep 17 00:00:00 2001
From: Raudi <mpell@web.de>
Date: Mon, 6 Jan 2014 19:44:08 -0500
Subject: [PATCH] hwdb: change key mappings for Samsung 90X3A
The Key codes didn't match with the described key. Also the key
identifier strings were missing. I hope I chose appropriate ones.
https://bugs.freedesktop.org/show_bug.cgi?id=70296
---
hwdb/60-keyboard.hwdb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index ab9e569..644cb94 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -886,7 +886,6 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr*
KEYBOARD_KEY_b3=!prog3 # Fn+F11 fan/cooling mode changer
# Series 9
-keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][AB]*:pvr*
KEYBOARD_KEY_ce=! # Fn+F8 keyboard backlight up
KEYBOARD_KEY_8d=! # Fn+F7 keyboard backlight down
@@ -894,6 +893,13 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][AB]*:pvr
KEYBOARD_KEY_97=! # Fn+F12 Wi-Fi toggle
KEYBOARD_KEY_d5=! # Fn+F6 battery life extender
+keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr*
+ KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings
+ KEYBOARD_KEY_8d=!prog3 # Fn+F6 performance mode
+ KEYBOARD_KEY_97=!kbdillumdown # Fn+F7 keyboard backlight down
+ KEYBOARD_KEY_96=!kbdillumup # Fn+F8 keyboard backlight up
+ KEYBOARD_KEY_d5=!wlan # Fn+F12 Wi-Fi toggle
+
# SQ1US
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pnSQ1US:pvr*
KEYBOARD_KEY_d4=menu

View File

@ -0,0 +1,22 @@
From 8e48fd6cc5e12bb1662970dc7a7d306550a9a079 Mon Sep 17 00:00:00 2001
From: Dmitry Pisklov <dpisklov@gmail.com>
Date: Mon, 6 Jan 2014 20:06:59 -0500
Subject: [PATCH] hwdb: add Samsung 700G
https://bugs.freedesktop.org/show_bug.cgi?id=72311
---
hwdb/60-keyboard.hwdb | 1 +
1 file changed, 1 insertion(+)
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 644cb94..ccfc734 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -875,6 +875,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr*
KEYBOARD_KEY_a9=! # Fn Lock - Function lock off
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr*
+keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700G*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][CDG]*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr*
KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings

View File

@ -0,0 +1,28 @@
From 1bfc778f2c82180873407f2da8a8c3335ae37b07 Mon Sep 17 00:00:00 2001
From: Dmitry Pisklov <dpisklov@gmail.com>
Date: Mon, 6 Jan 2014 20:08:21 -0500
Subject: [PATCH] hwdb: remove duplicate entry for Samsung 700Z
keyboardbrightnessup/down are not even real keys.
https://bugs.freedesktop.org/show_bug.cgi?id=72311
---
hwdb/60-keyboard.hwdb | 5 -----
1 file changed, 5 deletions(-)
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index ccfc734..cf3d1fb 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -918,11 +918,6 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*SX20S*:pvr*
KEYBOARD_KEY_77=f22 # Touchpad on
KEYBOARD_KEY_79=f23 # Touchpad off
-keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr*
- KEYBOARD_KEY_ba=ejectcd
- KEYBOARD_KEY_96=keyboardbrightnessup
- KEYBOARD_KEY_97=keyboardbrightnessdown
-
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700T*:pvr*
KEYBOARD_KEY_ad=leftmeta

View File

@ -0,0 +1,22 @@
From 0ec2b82ee4f1bb1fdbf3293cfe10e59240d5c533 Mon Sep 17 00:00:00 2001
From: AppleBloom <rat.o.drat@gmail.com>
Date: Mon, 6 Jan 2014 20:51:47 -0500
Subject: [PATCH] hwdb: fix match for Thinkpad X201 tablet
https://bugs.freedesktop.org/show_bug.cgi?id=71929
---
hwdb/60-keyboard.hwdb | 1 +
1 file changed, 1 insertion(+)
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index cf3d1fb..d253724 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -524,6 +524,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnS10-*:pvr*
# Thinkpad X200_Tablet
keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnThinkPad*X2*Tablet*:pvr*
+keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X2*Tablet*
KEYBOARD_KEY_5d=menu
KEYBOARD_KEY_63=fn
KEYBOARD_KEY_66=screenlock

View File

@ -0,0 +1,26 @@
From 5ed0efb00ec5cf103debcb4fc5f38398c59cc619 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martinpitt@gnome.org>
Date: Tue, 7 Jan 2014 09:40:01 +0100
Subject: [PATCH] keymap: Recognize different Toshiba Satellite capitalizations
https://launchpad.net/bugs/665918
---
hwdb/60-keyboard.hwdb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index d253724..84a061f 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -1056,9 +1056,9 @@ keyboard:dmi:bvn*:bvr*:bd*:svnFOXCONN:pnQBOOK:*
keyboard:dmi:bvn*:bvr*:bd*:svnMTC:pn*:pvrA0:*
keyboard:dmi:bvn*:bvr*:bd*:svnMio*Technology:pnN890:*
keyboard:dmi:bvn*:bvr*:bd*:svnPEGATRON*CORP.:pnSpring*Peak:*
-keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*[uU]30[05]*:pvr*
+keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*[uU][35]0[05]*:pvr*
+keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSATELLITE*[uU][35]0[05]*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*Pro*[uU]300*:pvr*
-keyboard:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSATELLITE*[uU]500*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnViooo*Corporation:pnPT17:*
keyboard:dmi:bvn*:bvr*:bd*:svnHANNspree:pnSN10E100:*
keyboard:dmi:bvn*:bvr*:bd*:svnGIGABYTE:pni1520M:*

View File

@ -0,0 +1,22 @@
From b1f114caf2e2b0913e4122847c7fa2b182b86771 Mon Sep 17 00:00:00 2001
From: Michele Curti <michele.curti@gmail.com>
Date: Tue, 7 Jan 2014 17:51:41 +0100
Subject: [PATCH] sleep.c: fix typo
---
src/sleep/sleep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index f96987f..c228cb6 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -90,7 +90,7 @@ static int execute(char **modes, char **states) {
const char* note = strappenda("SLEEP=", arg_verb);
/* This file is opened first, so that if we hit an error,
- * we can abort before modyfing any state. */
+ * we can abort before modifying any state. */
f = fopen("/sys/power/state", "we");
if (!f) {
log_error("Failed to open /sys/power/state: %m");

View File

@ -0,0 +1,22 @@
From 35fbb83e322dfe14771d0c84b623b423a38b1200 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Thu, 9 Jan 2014 16:43:00 +0100
Subject: [PATCH] delta: ensure that d_type will be set on every fs
---
src/delta/delta.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/delta/delta.c b/src/delta/delta.c
index ae658f9..a8dd57e 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -316,6 +316,8 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
if (!de)
return -errno;
+ dirent_ensure_type(d, de);
+
if (dropins && de->d_type == DT_DIR && endswith(de->d_name, ".d"))
enumerate_dir_d(top, bottom, drops, path, de->d_name);

View File

@ -0,0 +1,33 @@
From 3bef88018c93e77d50d3206e84f6fa2fe8c2fb99 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Thu, 9 Jan 2014 18:00:50 +0100
Subject: [PATCH] tmpfiles: don't allow label_fix to print ENOENT when we want
to ignore it
---
src/tmpfiles/tmpfiles.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 4dd1638..5e49cc8 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -435,8 +435,6 @@ finish:
}
static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
- int r;
-
/* not using i->path directly because it may be a glob */
if (i->mode_set)
if (chmod(path, i->mode) < 0) {
@@ -457,8 +455,7 @@ static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
}
}
- r = label_fix(path, false, false);
- return r == -ENOENT && ignore_enoent ? 0 : r;
+ return label_fix(path, ignore_enoent, false);
}
static int item_set_perms(Item *i, const char *path) {

View File

@ -0,0 +1,86 @@
From 4f4e72a317126e9d41db675ddae27a0942cd23bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 9 Jan 2014 22:23:32 -0500
Subject: [PATCH] man: mention which variables will be expanded in ExecStart
Conflicts:
man/systemd.service.xml
---
man/systemd.exec.xml | 6 ++++--
man/systemd.service.xml | 35 +++++++++++++++++++++++------------
2 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index e213ec4..c8414d4 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -295,9 +295,11 @@
for the assignment.</para>
<para>Example:
- <programlisting>Environment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"</programlisting>
+ <programlisting>Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"</programlisting>
gives three variables <literal>VAR1</literal>,
- <literal>VAR2</literal>, <literal>VAR3</literal>.
+ <literal>VAR2</literal>, <literal>VAR3</literal>
+ with the values <literal>word1 word2</literal>,
+ <literal>word3</literal>, <literal>$word 5 6</literal>.
</para>
<para>
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index af3e0f2..4fb21ba 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -392,16 +392,32 @@
replaced by the value of the
environment variable including all
whitespace it contains, resulting in a
- single argument. Use
+ single argument. Use
<literal>$FOO</literal> as a separate
word on the command line, in which
case it will be replaced by the value
- of the environment variable split up
- at whitespace, resulting in zero or
- more arguments. To pass literal dollar sign
- use <literal>$$</literal>. Note that the first
- argument (i.e. the program to execute)
- may not be a variable.</para>
+ of the environment variable split at
+ whitespace, resulting in zero or more
+ arguments. To pass a literal dollar
+ sign, use <literal>$$</literal>.
+ Variables whose value is not known at
+ expansion time are treated as empty
+ strings. Note that the first argument
+ (i.e. the program to execute) may not
+ be a variable.</para>
+
+ <para>Variables to be used in this
+ fashion may be defined through
+ <varname>Environment=</varname> and
+ <varname>EnvironmentFile=</varname>.
+ In addition, variables listed in
+ section "Environment variables in
+ spawned processes" in
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ which are considered "static
+ configuration" may used (this includes
+ e.g. <varname>$USER</varname>, but not
+ <varname>$TERM</varname>).</para>
<para>Optionally, if the absolute file
name is prefixed with
@@ -429,11 +445,6 @@
<programlisting>ExecStart=/bin/sh -c 'dmesg | tac'
</programlisting>
- <para>Only select environment variables that
- are set for executed commands. See
- <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
- </para>
-
<para>Example:</para>
<programlisting>ExecStart=/bin/echo one ; /bin/echo "two two"
</programlisting>

View File

@ -0,0 +1,28 @@
From 0fb47635e6db4d27b821388274c0c83d612fc0bb Mon Sep 17 00:00:00 2001
From: Unai Uribarri <unaiur@gmail.com>
Date: Sat, 11 Jan 2014 09:19:41 -0500
Subject: [PATCH] hwdb: Add support for Toshiba Satellite P75-A7200 keyboard
---
hwdb/60-keyboard.hwdb | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 84a061f..e3d1f02 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -1012,6 +1012,14 @@ keyboard:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSATELLITEU940
KEYBOARD_KEY_13e=switchvideomode
KEYBOARD_KEY_13f=f21 # Touchpad toggle
+# Satellite P75-A7200
+keyboard:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A:pvr*
+ KEYBOARD_KEY_13c=brightnessdown
+ KEYBOARD_KEY_13d=brightnessup
+ KEYBOARD_KEY_13e=switchvideomode
+ KEYBOARD_KEY_13f=touchpad_toggle
+ KEYBOARD_KEY_9e=wlan
+
###########################################################
# VIA
###########################################################

View File

@ -0,0 +1,321 @@
From 9b9103a07cc32fa76be4c71fcd9a93b5d946edd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 28 Dec 2013 19:33:23 -0500
Subject: [PATCH] journal: fix access to munmapped memory in
sd_journal_enumerate_unique
sd_j_e_u needs to keep a reference to an object while comparing it
with possibly duplicate objects in other files. Because the size of
mmap cache is limited, with enough files and object to compare to,
at some point the object being compared would be munmapped, resulting
in a segmentation fault.
Fix this issue by turning keep_always into a reference count that can
be increased and decreased. Other callers which set keep_always=true
are unmodified: their references are never released but are ignored
when the whole file is closed, which happens at some point. keep_always
is increased in sd_j_e_u and later on released.
---
src/journal/journal-file.c | 5 +---
src/journal/journal-file.h | 24 +++++++++++++++++++
src/journal/journal-verify.c | 4 ----
src/journal/mmap-cache.c | 57 +++++++++++++++++++++++++++++++++++---------
src/journal/mmap-cache.h | 18 +++++++++++++-
src/journal/sd-journal.c | 18 +++++++++++---
6 files changed, 103 insertions(+), 23 deletions(-)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index ba65464..4d9787a 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -419,7 +419,6 @@ int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Objec
void *t;
Object *o;
uint64_t s;
- unsigned context;
assert(f);
assert(ret);
@@ -428,10 +427,8 @@ int journal_file_move_to_object(JournalFile *f, int type, uint64_t offset, Objec
if (!VALID64(offset))
return -EFAULT;
- /* One context for each type, plus one catch-all for the rest */
- context = type > 0 && type < _OBJECT_TYPE_MAX ? type : 0;
- r = journal_file_move_to(f, context, false, offset, sizeof(ObjectHeader), &t);
+ r = journal_file_move_to(f, type_to_context(type), false, offset, sizeof(ObjectHeader), &t);
if (r < 0)
return r;
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h
index 50bdb67..0bd23f7 100644
--- a/src/journal/journal-file.h
+++ b/src/journal/journal-file.h
@@ -128,6 +128,10 @@ int journal_file_open_reliably(
#define ALIGN64(x) (((x) + 7ULL) & ~7ULL)
#define VALID64(x) (((x) & 7ULL) == 0ULL)
+/* Use six characters to cover the offsets common in smallish journal
+ * files without adding too many zeros. */
+#define OFSfmt "%06"PRIx64
+
static inline bool VALID_REALTIME(uint64_t u) {
/* This considers timestamps until the year 3112 valid. That should be plenty room... */
return u > 0 && u < (1ULL << 55);
@@ -197,3 +201,23 @@ int journal_file_get_cutoff_realtime_usec(JournalFile *f, usec_t *from, usec_t *
int journal_file_get_cutoff_monotonic_usec(JournalFile *f, sd_id128_t boot, usec_t *from, usec_t *to);
bool journal_file_rotate_suggested(JournalFile *f, usec_t max_file_usec);
+
+
+static unsigned type_to_context(int type) {
+ /* One context for each type, plus one catch-all for the rest */
+ return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0;
+}
+
+static inline int journal_file_object_keep(JournalFile *f, Object *o, uint64_t offset) {
+ unsigned context = type_to_context(o->object.type);
+
+ return mmap_cache_get(f->mmap, f->fd, f->prot, context, true,
+ offset, o->object.size, &f->last_stat, NULL);
+}
+
+static inline int journal_file_object_release(JournalFile *f, Object *o, uint64_t offset) {
+ unsigned context = type_to_context(o->object.type);
+
+ return mmap_cache_release(f->mmap, f->fd, f->prot, context,
+ offset, o->object.size);
+}
diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c
index 82b0f0a..f2422ff 100644
--- a/src/journal/journal-verify.c
+++ b/src/journal/journal-verify.c
@@ -34,10 +34,6 @@
#include "compress.h"
#include "fsprg.h"
-/* Use six characters to cover the offsets common in smallish journal
- * files without adding to many zeros. */
-#define OFSfmt "%06"PRIx64
-
static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o) {
uint64_t i;
diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c
index 42a8a7d..24b2bb8 100644
--- a/src/journal/mmap-cache.c
+++ b/src/journal/mmap-cache.c
@@ -38,7 +38,7 @@ typedef struct FileDescriptor FileDescriptor;
struct Window {
MMapCache *cache;
- bool keep_always;
+ unsigned keep_always;
bool in_unused;
int prot;
@@ -185,7 +185,7 @@ static void context_detach_window(Context *c) {
c->window = NULL;
LIST_REMOVE(Context, by_window, w->contexts, c);
- if (!w->contexts && !w->keep_always) {
+ if (!w->contexts && w->keep_always == 0) {
/* Not used anymore? */
LIST_PREPEND(Window, unused, c->cache->unused, w);
if (!c->cache->last_unused)
@@ -360,7 +360,6 @@ static int try_context(
assert(m->n_ref > 0);
assert(fd >= 0);
assert(size > 0);
- assert(ret);
c = hashmap_get(m->contexts, UINT_TO_PTR(context+1));
if (!c)
@@ -378,9 +377,10 @@ static int try_context(
return 0;
}
- c->window->keep_always = c->window->keep_always || keep_always;
+ c->window->keep_always += keep_always;
- *ret = (uint8_t*) c->window->ptr + (offset - c->window->offset);
+ if (ret)
+ *ret = (uint8_t*) c->window->ptr + (offset - c->window->offset);
return 1;
}
@@ -402,7 +402,6 @@ static int find_mmap(
assert(m->n_ref > 0);
assert(fd >= 0);
assert(size > 0);
- assert(ret);
f = hashmap_get(m->fds, INT_TO_PTR(fd + 1));
if (!f)
@@ -422,9 +421,10 @@ static int find_mmap(
return -ENOMEM;
context_attach_window(c, w);
- w->keep_always = w->keep_always || keep_always;
+ w->keep_always += keep_always;
- *ret = (uint8_t*) w->ptr + (offset - w->offset);
+ if (ret)
+ *ret = (uint8_t*) w->ptr + (offset - w->offset);
return 1;
}
@@ -450,7 +450,6 @@ static int add_mmap(
assert(m->n_ref > 0);
assert(fd >= 0);
assert(size > 0);
- assert(ret);
woffset = offset & ~((uint64_t) page_size() - 1ULL);
wsize = size + (offset - woffset);
@@ -520,7 +519,8 @@ static int add_mmap(
c->window = w;
LIST_PREPEND(Context, by_window, w->contexts, c);
- *ret = (uint8_t*) w->ptr + (offset - w->offset);
+ if (ret)
+ *ret = (uint8_t*) w->ptr + (offset - w->offset);
return 1;
}
@@ -541,7 +541,6 @@ int mmap_cache_get(
assert(m->n_ref > 0);
assert(fd >= 0);
assert(size > 0);
- assert(ret);
/* Check whether the current context is the right one already */
r = try_context(m, fd, prot, context, keep_always, offset, size, ret);
@@ -563,6 +562,42 @@ int mmap_cache_get(
return add_mmap(m, fd, prot, context, keep_always, offset, size, st, ret);
}
+int mmap_cache_release(
+ MMapCache *m,
+ int fd,
+ int prot,
+ unsigned context,
+ uint64_t offset,
+ size_t size) {
+
+ FileDescriptor *f;
+ Window *w;
+
+ assert(m);
+ assert(m->n_ref > 0);
+ assert(fd >= 0);
+ assert(size > 0);
+
+ f = hashmap_get(m->fds, INT_TO_PTR(fd + 1));
+ if (!f)
+ return -EBADF;
+
+ assert(f->fd == fd);
+
+ LIST_FOREACH(by_fd, w, f->windows)
+ if (window_matches(w, fd, prot, offset, size))
+ break;
+
+ if (!w)
+ return -ENOENT;
+
+ if (w->keep_always == 0)
+ return -ENOLCK;
+
+ w->keep_always -= 1;
+ return 0;
+}
+
void mmap_cache_close_fd(MMapCache *m, int fd) {
FileDescriptor *f;
diff --git a/src/journal/mmap-cache.h b/src/journal/mmap-cache.h
index 912336d..647555a 100644
--- a/src/journal/mmap-cache.h
+++ b/src/journal/mmap-cache.h
@@ -31,7 +31,23 @@ MMapCache* mmap_cache_new(void);
MMapCache* mmap_cache_ref(MMapCache *m);
MMapCache* mmap_cache_unref(MMapCache *m);
-int mmap_cache_get(MMapCache *m, int fd, int prot, unsigned context, bool keep_always, uint64_t offset, size_t size, struct stat *st, void **ret);
+int mmap_cache_get(
+ MMapCache *m,
+ int fd,
+ int prot,
+ unsigned context,
+ bool keep_always,
+ uint64_t offset,
+ size_t size,
+ struct stat *st,
+ void **ret);
+int mmap_cache_release(
+ MMapCache *m,
+ int fd,
+ int prot,
+ unsigned context,
+ uint64_t offset,
+ size_t size);
void mmap_cache_close_fd(MMapCache *m, int fd);
void mmap_cache_close_context(MMapCache *m, unsigned context);
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 52abbe9..46c3feb 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -2508,9 +2508,7 @@ _public_ int sd_journal_query_unique(sd_journal *j, const char *field) {
}
_public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l) {
- Object *o;
size_t k;
- int r;
if (!j)
return -EINVAL;
@@ -2535,9 +2533,11 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_
for (;;) {
JournalFile *of;
Iterator i;
+ Object *o;
const void *odata;
size_t ol;
bool found;
+ int r;
/* Proceed to next data object in the field's linked list */
if (j->unique_offset == 0) {
@@ -2574,8 +2574,16 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_
return r;
/* Let's do the type check by hand, since we used 0 context above. */
- if (o->object.type != OBJECT_DATA)
+ if (o->object.type != OBJECT_DATA) {
+ log_error("%s:offset " OFSfmt ": object has type %d, expected %d",
+ j->unique_file->path, j->unique_offset,
+ o->object.type, OBJECT_DATA);
return -EBADMSG;
+ }
+
+ r = journal_file_object_keep(j->unique_file, o, j->unique_offset);
+ if (r < 0)
+ return r;
r = return_data(j, j->unique_file, o, &odata, &ol);
if (r < 0)
@@ -2609,6 +2617,10 @@ _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_
if (found)
continue;
+ r = journal_file_object_release(j->unique_file, o, j->unique_offset);
+ if (r < 0)
+ return r;
+
r = return_data(j, j->unique_file, o, data, l);
if (r < 0)
return r;

View File

@ -0,0 +1,32 @@
From 182a32427b50aed5812833e3ecb8a6078160a501 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com>
Date: Tue, 7 Jan 2014 15:00:22 +0100
Subject: [PATCH] gpt-auto-generator: skip nonexistent devices
The devices we work with have eMMC chips for storage. The chips
provide four "hardware" partitions. The first is /dev/mmcblk0, it
takes almost whole space and holds a GPT with several real partitions
(/dev/mmcblk0p?). Then there are three block devices (mmcblk0boot0,
mmcblk0boot1, rpmb) that are part of the same hardware as mmcblk0 that
are presented by the kernel as children of the latter. That relationship
makes gpt-auto-generator try to peek them but since they are not GPT
partitions blkid_do_safeprobe() returns -2 making verify_gpt_parition()
function return -ENODEV.
---
src/gpt-auto-generator/gpt-auto-generator.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index 25440e7..0e8e959 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -298,6 +298,9 @@ static int enumerate_partitions(struct udev *udev, dev_t dev) {
r = verify_gpt_partition(node, &type_id, &nr, &fstype);
if (r < 0) {
+ /* skip child devices which are not detected properly */
+ if (r == -ENODEV)
+ continue;
log_error("Failed to verify GPT partition %s: %s",
node, strerror(-r));
return r;

View File

@ -0,0 +1,38 @@
From 15ef380be7e38898fe2aef4ae3aa6fb0ce804564 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 11 Jan 2014 16:45:29 -0500
Subject: [PATCH] gpt-auto-generator: use EBADSLT code when unable to detect
partition type
ENODEV suggests that something is missing, which is be misleading
here.
---
src/gpt-auto-generator/gpt-auto-generator.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index 0e8e959..d7c09f0 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -74,10 +74,8 @@ static int verify_gpt_partition(const char *node, sd_id128_t *type, unsigned *nr
errno = 0;
r = blkid_do_safeprobe(b);
- if (r == -2)
- return -ENODEV;
- else if (r == 1)
- return -ENODEV;
+ if (r == -2 || r == 1) /* no result or uncertain */
+ return -EBADSLT;
else if (r != 0)
return errno ? -errno : -EIO;
@@ -299,7 +297,7 @@ static int enumerate_partitions(struct udev *udev, dev_t dev) {
r = verify_gpt_partition(node, &type_id, &nr, &fstype);
if (r < 0) {
/* skip child devices which are not detected properly */
- if (r == -ENODEV)
+ if (r == -EBADSLT)
continue;
log_error("Failed to verify GPT partition %s: %s",
node, strerror(-r));

View File

@ -0,0 +1,265 @@
From 96dc1b72f3fb5d344538984121e11e5804905145 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 13 Nov 2013 00:42:22 -0500
Subject: [PATCH] journald: do not free space when disk space runs low
Before, journald would remove journal files until both MaxUse= and
KeepFree= settings would be satisfied. The first one depends (if set
automatically) on the size of the file system and is constant. But
the second one depends on current use of the file system, and a spike
in disk usage would cause journald to delete journal files, trying to
reach usage which would leave 15% of the disk free. This behaviour is
surprising for the user who doesn't expect his logs to be purged when
disk usage goes above 85%, which on a large disk could be some
gigabytes from being full. In addition attempting to keep 15% free
provides an attack vector where filling the disk sufficiently disposes
of almost all logs.
Instead, obey KeepFree= only as a limit on adding additional files.
When replacing old files with new, ignore KeepFree=. This means that
if journal disk usage reached some high point that at some later point
start to violate the KeepFree= constraint, journald will not add files
to go above this point, but it will stay (slightly) below it. When
journald is restarted, it forgets the previous maximum usage value,
and sets the limit based on the current usage, so if disk remains to
be filled, journald might use one journal-file-size less on each
restart, if restarts happen just after rotation. This seems like a
reasonable compromise between implementation complexity and robustness.
---
man/journald.conf.xml | 39 +++++++++++++++++++++++----------
src/journal/journal-file.h | 1 +
src/journal/journal-vacuum.c | 6 ++---
src/journal/journal-vacuum.h | 2 +-
src/journal/journald-server.c | 22 ++++++++++++++-----
src/journal/test-journal-interleaving.c | 4 ++--
src/journal/test-journal.c | 4 ++--
src/shared/macro.h | 7 ++++++
8 files changed, 58 insertions(+), 27 deletions(-)
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index b362c5d..e0796e1 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -250,20 +250,35 @@
<para><varname>SystemMaxUse=</varname>
and <varname>RuntimeMaxUse=</varname>
control how much disk space the
- journal may use up at
- maximum. Defaults to 10% of the size
- of the respective file
- system. <varname>SystemKeepFree=</varname>
- and
+ journal may use up at maximum.
+ <varname>SystemKeepFree=</varname> and
<varname>RuntimeKeepFree=</varname>
control how much disk space
- systemd-journald shall always leave
- free for other uses. Defaults to 15%
- of the size of the respective file
- system. systemd-journald will respect
- both limits, i.e. use the smaller of
- the two values.
- <varname>SystemMaxFileSize=</varname>
+ systemd-journald shall leave free for
+ other uses.
+ <command>systemd-journald</command>
+ will respect both limits and use the
+ smaller of the two values.</para>
+
+ <para>The first pair defaults to 10%
+ and the second to 15% of the size of
+ the respective file system. If the
+ file system is nearly full and either
+ <varname>SystemKeepFree=</varname> or
+ <varname>RuntimeKeepFree=</varname> is
+ violated when systemd-journald is
+ started, the value will be raised to
+ percentage that is actually free. This
+ means that if before there was enough
+ free space and journal files were
+ created, and subsequently something
+ else causes the file system to fill
+ up, journald will stop using more
+ space, but it'll will not removing
+ existing files to go reduce footprint
+ either.</para>
+
+ <para><varname>SystemMaxFileSize=</varname>
and
<varname>RuntimeMaxFileSize=</varname>
control how large individual journal
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h
index 0bd23f7..2e06b57 100644
--- a/src/journal/journal-file.h
+++ b/src/journal/journal-file.h
@@ -37,6 +37,7 @@
typedef struct JournalMetrics {
uint64_t max_use;
+ uint64_t use;
uint64_t max_size;
uint64_t min_size;
uint64_t keep_free;
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index d4a1c6c..8b07f65 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -150,7 +150,6 @@ static int journal_file_empty(int dir_fd, const char *name) {
int journal_directory_vacuum(
const char *directory,
uint64_t max_use,
- uint64_t min_free,
usec_t max_retention_usec,
usec_t *oldest_usec) {
@@ -164,7 +163,7 @@ int journal_directory_vacuum(
assert(directory);
- if (max_use <= 0 && min_free <= 0 && max_retention_usec <= 0)
+ if (max_use <= 0 && max_retention_usec <= 0)
return 0;
if (max_retention_usec > 0) {
@@ -310,8 +309,7 @@ int journal_directory_vacuum(
}
if ((max_retention_usec <= 0 || list[i].realtime >= retention_limit) &&
- (max_use <= 0 || sum <= max_use) &&
- (min_free <= 0 || (uint64_t) ss.f_bavail * (uint64_t) ss.f_bsize >= min_free))
+ (max_use <= 0 || sum <= max_use))
break;
if (unlinkat(dirfd(d), list[i].filename, 0) >= 0) {
diff --git a/src/journal/journal-vacuum.h b/src/journal/journal-vacuum.h
index f5e3e52..bc30c3a 100644
--- a/src/journal/journal-vacuum.h
+++ b/src/journal/journal-vacuum.h
@@ -23,4 +23,4 @@
#include <inttypes.h>
-int journal_directory_vacuum(const char *directory, uint64_t max_use, uint64_t min_free, usec_t max_retention_usec, usec_t *oldest_usec);
+int journal_directory_vacuum(const char *directory, uint64_t max_use, usec_t max_retention_usec, usec_t *oldest_usec);
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 1fcb3d5..cd2cfe9 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -158,9 +158,18 @@ static uint64_t available_space(Server *s, bool verbose) {
}
ss_avail = ss.f_bsize * ss.f_bavail;
- avail = ss_avail > m->keep_free ? ss_avail - m->keep_free : 0;
- s->cached_available_space = MIN(m->max_use, avail) > sum ? MIN(m->max_use, avail) - sum : 0;
+ /* If we reached a high mark, we will always allow this much
+ * again, unless usage goes above max_use. This watermark
+ * value is cached so that we don't give up space on pressure,
+ * but hover below the maximum usage. */
+
+ if (m->use < sum)
+ m->use = sum;
+
+ avail = LESS_BY(ss_avail, m->keep_free);
+
+ s->cached_available_space = LESS_BY(MIN(m->max_use, avail), sum);
s->cached_available_space_timestamp = ts;
if (verbose) {
@@ -168,13 +177,14 @@ static uint64_t available_space(Server *s, bool verbose) {
fb4[FORMAT_BYTES_MAX], fb5[FORMAT_BYTES_MAX];
server_driver_message(s, SD_MESSAGE_JOURNAL_USAGE,
- "%s journal is using %s (max %s, leaving %s of free %s, current limit %s).",
+ "%s journal is using %s (max allowed %s, "
+ "trying to leave %s free of %s available → current limit %s).",
s->system_journal ? "Permanent" : "Runtime",
format_bytes(fb1, sizeof(fb1), sum),
format_bytes(fb2, sizeof(fb2), m->max_use),
format_bytes(fb3, sizeof(fb3), m->keep_free),
format_bytes(fb4, sizeof(fb4), ss_avail),
- format_bytes(fb5, sizeof(fb5), MIN(m->max_use, avail)));
+ format_bytes(fb5, sizeof(fb5), s->cached_available_space + sum));
}
return s->cached_available_space;
@@ -378,7 +388,7 @@ void server_vacuum(Server *s) {
if (s->system_journal) {
char *p = strappenda("/var/log/journal/", ids);
- r = journal_directory_vacuum(p, s->system_metrics.max_use, s->system_metrics.keep_free, s->max_retention_usec, &s->oldest_file_usec);
+ r = journal_directory_vacuum(p, s->system_metrics.max_use, s->max_retention_usec, &s->oldest_file_usec);
if (r < 0 && r != -ENOENT)
log_error("Failed to vacuum %s: %s", p, strerror(-r));
}
@@ -386,7 +396,7 @@ void server_vacuum(Server *s) {
if (s->runtime_journal) {
char *p = strappenda("/run/log/journal/", ids);
- r = journal_directory_vacuum(p, s->runtime_metrics.max_use, s->runtime_metrics.keep_free, s->max_retention_usec, &s->oldest_file_usec);
+ r = journal_directory_vacuum(p, s->runtime_metrics.max_use, s->max_retention_usec, &s->oldest_file_usec);
if (r < 0 && r != -ENOENT)
log_error("Failed to vacuum %s: %s", p, strerror(-r));
}
diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c
index 1a058ea..974fa3b 100644
--- a/src/journal/test-journal-interleaving.c
+++ b/src/journal/test-journal-interleaving.c
@@ -194,7 +194,7 @@ static void test_skip(void (*setup)(void))
if (arg_keep)
log_info("Not removing %s", t);
else {
- journal_directory_vacuum(".", 3000000, 0, 0, NULL);
+ journal_directory_vacuum(".", 3000000, 0, NULL);
assert_se(rm_rf_dangerous(t, false, true, false) >= 0);
}
@@ -279,7 +279,7 @@ static void test_sequence_numbers(void) {
if (arg_keep)
log_info("Not removing %s", t);
else {
- journal_directory_vacuum(".", 3000000, 0, 0, NULL);
+ journal_directory_vacuum(".", 3000000, 0, NULL);
assert_se(rm_rf_dangerous(t, false, true, false) >= 0);
}
diff --git a/src/journal/test-journal.c b/src/journal/test-journal.c
index 190c426..3b8778d 100644
--- a/src/journal/test-journal.c
+++ b/src/journal/test-journal.c
@@ -126,7 +126,7 @@ static void test_non_empty(void) {
if (arg_keep)
log_info("Not removing %s", t);
else {
- journal_directory_vacuum(".", 3000000, 0, 0, NULL);
+ journal_directory_vacuum(".", 3000000, 0, NULL);
assert_se(rm_rf_dangerous(t, false, true, false) >= 0);
}
@@ -165,7 +165,7 @@ static void test_empty(void) {
if (arg_keep)
log_info("Not removing %s", t);
else {
- journal_directory_vacuum(".", 3000000, 0, 0, NULL);
+ journal_directory_vacuum(".", 3000000, 0, NULL);
assert_se(rm_rf_dangerous(t, false, true, false) >= 0);
}
diff --git a/src/shared/macro.h b/src/shared/macro.h
index d4f92b6..bc5b3c1 100644
--- a/src/shared/macro.h
+++ b/src/shared/macro.h
@@ -114,6 +114,13 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
_a < _b ? _a : _b; \
})
+#define LESS_BY(A,B) \
+ __extension__ ({ \
+ typeof(A) _A = (A); \
+ typeof(B) _B = (B); \
+ _A > _B ? _A - _B : 0; \
+ })
+
#ifndef CLAMP
#define CLAMP(x, low, high) \
__extension__ ({ \

239
0237-man-add-busctl-1.patch Normal file
View File

@ -0,0 +1,239 @@
From 7cfdb4b03c310e9bb55609a98eb70356e4c50148 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 11 Jan 2014 23:44:34 -0500
Subject: [PATCH] man: add busctl(1)
Conflicts:
Makefile-man.am
TODO
man/systemd-bus-proxyd.xml
---
Makefile-man.am | 1 +
man/busctl.xml | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 207 insertions(+)
create mode 100644 man/busctl.xml
diff --git a/Makefile-man.am b/Makefile-man.am
index 3f626e8..9c3cb35 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -3,6 +3,7 @@
MANPAGES += \
man/bootup.7 \
+ man/busctl.1 \
man/daemon.7 \
man/halt.8 \
man/hostname.5 \
diff --git a/man/busctl.xml b/man/busctl.xml
new file mode 100644
index 0000000..0c5f05a
--- /dev/null
+++ b/man/busctl.xml
@@ -0,0 +1,206 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!--
+This file is part of systemd.
+
+Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+systemd is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+
+systemd is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<refentry id="busctl">
+
+ <refentryinfo>
+ <title>busctl</title>
+ <productname>systemd</productname>
+
+ <authorgroup>
+ <author>
+ <contrib>A monkey with a typewriter</contrib>
+ <firstname>Zbigniew</firstname>
+ <surname>Jędrzejewski-Szmek</surname>
+ <email>zbyszek@in.waw.pl</email>
+ </author>
+ </authorgroup>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>busctl</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>busctl</refname>
+ <refpurpose>Introspect the bus</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>busctl</command>
+ <arg choice="opt" rep="repeat">OPTIONS</arg>
+ <arg choice="opt">COMMAND</arg>
+ <arg choice="opt" rep="repeat"><replaceable>NAME</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para><command>busctl</command> may be used to
+ introspect and monitor the D-Bus bus.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <para>The following options are understood:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-h</option></term>
+ <term><option>--help</option></term>
+
+ <listitem><para>Print a short help text and exit.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--version</option></term>
+
+ <listitem>
+ <para>Print a short version string and exit.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--no-pager</option></term>
+
+ <listitem>
+ <para>Do not pipe output into a pager.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--system</option></term>
+
+ <listitem>
+ <para>Talk to the systemd system manager (the
+ default).</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--user</option></term>
+
+ <listitem>
+ <para>Talk to the systemd manager of the calling
+ user.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--address=<replaceable>ADDRESS</replaceable></option></term>
+
+ <listitem><para>Connect to the bus specified by
+ <replaceable>ADDRESS</replaceable> instead of using suitable
+ defaults for either the system or user bus (see
+ <option>--system</option> and <option>--user</option>
+ options).</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--show-machine</option></term>
+
+ <listitem><para>When showing the list of endpoints, show a
+ column containing the names of containers they belong to.
+ See
+ <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--unique</option></term>
+
+ <listitem><para>When showing the list of endpoints, show
+ only "unique" names (of the form
+ <literal>:<replaceable>number</replaceable>.<replaceable>number</replaceable></literal>).
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--acquired</option></term>
+
+ <listitem><para>The opposite of <option>--unique</option> —
+ only "well-known" names will be shown.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--activatable</option></term>
+
+ <listitem><para>When showing the list of endpoints, show
+ only endpoints which haven't actually been activated yet,
+ but may be started automatically if accessed.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--match=<replaceable>MATCH</replaceable></option></term>
+
+ <listitem><para>When showing messages being exchanged, show only the
+ subset matching <replaceable>MATCH</replaceable>.</para></listitem>
+ <!-- TODO: link to sd_bus_add_match when it is written? -->
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Commands</title>
+
+ <para>The following commands are understood:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><command>list</command></term>
+
+ <listitem><para>Show endpoints attached to the bus. This is
+ the default if no command is specified.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>monitor</command> <arg choice="opt" rep="repeat"><replaceable>NAME</replaceable></arg></term>
+
+ <listitem><para>Dump messages being exchanged. If
+ <replaceable>NAME</replaceable> is specified, show messages
+ to or from this endpoint. Otherwsise, show all messages on the
+ bus.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <para>
+ <citerefentry><refentrytitle>dbus-daemon</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <ulink url="http://freedesktop.org/wiki/Software/dbus">D-Bus</ulink>,
+ <ulink url="https://code.google.com/p/d-bus/">kdbus</ulink>,
+ <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ </para>
+ </refsect1>
+</refentry>

View File

@ -0,0 +1,107 @@
From 25bebb7cc2b1b0d4ffc9ed02c348ae96b49c4572 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 6 Oct 2013 21:55:18 -0400
Subject: [PATCH] journalctl: flip to --full by default
We already shew lines in full when using a pager or not on a
tty. The commit disables ellipsization in the sole remaining case,
namely when --follow is used.
This has been a popular request for a long time, and indeed, full
output seems much more useful. Old behaviour can still be requested by
using --no-full. Old options retain their behaviour for compatiblity,
but aren't advertised as much. This change applies only to jornalctl,
not to systemctl, when ellipsization is useful to keep the layout.
https://bugzilla.redhat.com/show_bug.cgi?id=984758
---
man/journalctl.xml | 15 ++++++++++++---
src/journal/journalctl.c | 12 +++++++++---
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/man/journalctl.xml b/man/journalctl.xml
index d75c758..d1e841a 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -152,11 +152,20 @@
</varlistentry>
<varlistentry>
- <term><option>-l</option></term>
+ <term><option>--no-full</option></term>
<term><option>--full</option></term>
+ <term><option>-l</option></term>
+
+ <listitem><para>Ellipsize fields when
+ they don't fit in available columns.
+ The default is to show full fields,
+ allowing them to wrap or be truncated
+ by the pager if one is used.</para>
- <listitem><para>Show all (printable) fields in
- full.</para></listitem>
+ <para>Old options
+ <option>-l</option>/<option>--full</option>
+ not useful anymore, except to undo
+ <option>--no-full</option>.</para></listitem>
</varlistentry>
<varlistentry>
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index ccd96b2..1b5bdd3 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -64,7 +64,7 @@
static OutputMode arg_output = OUTPUT_SHORT;
static bool arg_pager_end = false;
static bool arg_follow = false;
-static bool arg_full = false;
+static bool arg_full = true;
static bool arg_all = false;
static bool arg_no_pager = false;
static int arg_lines = -1;
@@ -187,7 +187,7 @@ static int help(void) {
" short-precise, short-monotonic, verbose,\n"
" export, json, json-pretty, json-sse, cat)\n"
" -x --catalog Add message explanations where available\n"
- " -l --full Do not ellipsize fields\n"
+ " --no-full Ellipsize fields\n"
" -a --all Show all fields, including long and unprintable\n"
" -q --quiet Do not show privilege warning\n"
" --no-pager Do not pipe output into a pager\n"
@@ -224,6 +224,7 @@ static int parse_argv(int argc, char *argv[]) {
enum {
ARG_VERSION = 0x100,
ARG_NO_PAGER,
+ ARG_NO_FULL,
ARG_NO_TAIL,
ARG_NEW_ID128,
ARG_LIST_BOOTS,
@@ -258,6 +259,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "output", required_argument, NULL, 'o' },
{ "all", no_argument, NULL, 'a' },
{ "full", no_argument, NULL, 'l' },
+ { "no-full", no_argument, NULL, ARG_NO_FULL },
{ "lines", optional_argument, NULL, 'n' },
{ "no-tail", no_argument, NULL, ARG_NO_TAIL },
{ "new-id128", no_argument, NULL, ARG_NEW_ID128 },
@@ -349,6 +351,10 @@ static int parse_argv(int argc, char *argv[]) {
arg_full = true;
break;
+ case ARG_NO_FULL:
+ arg_full = false;
+ break;
+
case 'a':
arg_all = true;
break;
@@ -1736,7 +1742,7 @@ int main(int argc, char *argv[]) {
flags =
arg_all * OUTPUT_SHOW_ALL |
- (arg_full || !on_tty() || pager_have()) * OUTPUT_FULL_WIDTH |
+ arg_full * OUTPUT_FULL_WIDTH |
on_tty() * OUTPUT_COLOR |
arg_catalog * OUTPUT_CATALOG;

View File

@ -1,6 +1,6 @@
From dd33348393551411885397ff7d88a3a908eeb018 Mon Sep 17 00:00:00 2001
From 0fe97bc02e3108efdb844feb1b367a89ba995d83 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 13 Mar 2013 07:57:53 +0100
Date: Tue, 14 Jan 2014 17:48:08 -0500
Subject: [PATCH] kernel-install: add fedora specific callouts to
new-kernel-pkg
@ -9,7 +9,7 @@ Subject: [PATCH] kernel-install: add fedora specific callouts to
1 file changed, 21 insertions(+)
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
index fb2ee57..31e988a 100644
index 3ae1d77..3a2ac56 100644
--- a/src/kernel-install/kernel-install
+++ b/src/kernel-install/kernel-install
@@ -19,6 +19,27 @@
@ -39,7 +39,4 @@ index fb2ee57..31e988a 100644
+
usage()
{
echo "Usage:" >&2
--
1.8.3.1
echo "Usage:"

Some files were not shown because too many files have changed in this diff Show More