summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/os-release.xml16
-rw-r--r--src/cgtop/cgtop.c4
-rw-r--r--src/core/mount.c1
-rw-r--r--src/fstab-generator/fstab-generator.c6
-rw-r--r--src/libsystemd/sd-netlink/netlink-message.c10
5 files changed, 32 insertions, 5 deletions
diff --git a/man/os-release.xml b/man/os-release.xml
index 4557abc4a3..99bbb61004 100644
--- a/man/os-release.xml
+++ b/man/os-release.xml
@@ -176,6 +176,22 @@
</varlistentry>
<varlistentry>
+ <term><varname>VERSION_CODENAME=</varname></term>
+
+ <listitem><para>
+ A lower-case string (no spaces or other characters outside of
+ 0–9, a–z, ".", "_" and "-") identifying the operating system
+ release code name, excluding any OS name information or
+ release version, and suitable for processing by scripts or
+ usage in generated filenames. This field is optional and may
+ not be implemented on all systems.
+ Examples:
+ <literal>VERSION_CODENAME=buster</literal>,
+ <literal>VERSION_CODENAME=xenial</literal>
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><varname>VERSION_ID=</varname></term>
<listitem><para>A lower-case string (mostly numeric, no spaces
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index 6bd2288897..c67b328b38 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -868,14 +868,16 @@ static int get_cgroup_root(char **ret) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_free_ char *unit = NULL, *path = NULL;
- char *aux;
const char *m;
int r;
if (arg_root) {
+ char *aux;
+
aux = strdup(arg_root);
if (!aux)
return log_oom();
+
*ret = aux;
return 0;
}
diff --git a/src/core/mount.c b/src/core/mount.c
index 665a60bb55..fda4d65d6f 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1706,6 +1706,7 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
/* This has just been unmounted by
* somebody else, follow the state
* change. */
+ mount->result = MOUNT_SUCCESS; /* make sure we forget any earlier umount failures */
mount_enter_dead(mount, MOUNT_SUCCESS);
break;
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 108522873e..fc7cf39847 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -496,6 +496,12 @@ static int add_sysroot_mount(void) {
return 0;
}
+ if (streq(arg_root_what, "gpt-auto")) {
+ /* This is handled by the gpt-auto generator */
+ log_debug("Skipping root directory handling, as gpt-auto was requested.");
+ return 0;
+ }
+
what = fstab_node_to_udev_node(arg_root_what);
if (!what)
return log_oom();
diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/sd-netlink/netlink-message.c
index 86d8dee867..df3b3c922e 100644
--- a/src/libsystemd/sd-netlink/netlink-message.c
+++ b/src/libsystemd/sd-netlink/netlink-message.c
@@ -120,7 +120,9 @@ sd_netlink_message *sd_netlink_message_ref(sd_netlink_message *m) {
}
sd_netlink_message *sd_netlink_message_unref(sd_netlink_message *m) {
- if (m && REFCNT_DEC(m->n_ref) == 0) {
+ sd_netlink_message *t;
+
+ while (m && REFCNT_DEC(m->n_ref) == 0) {
unsigned i;
free(m->hdr);
@@ -128,9 +130,9 @@ sd_netlink_message *sd_netlink_message_unref(sd_netlink_message *m) {
for (i = 0; i <= m->n_containers; i++)
free(m->containers[i].attributes);
- sd_netlink_message_unref(m->next);
-
- free(m);
+ t = m;
+ m = m->next;
+ free(t);
}
return NULL;