forked from pool/systemd
2ce609fe24
- Ensure /usr/lib/systemd/system/shutdown.target.wants is created and owned by systemd package. (forwarded request 185494 from fcrozat) OBS-URL: https://build.opensuse.org/request/show/185496 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=151
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From 1e4fc9b1d8449e87474b3af8a4ddab09fab27cd5 Mon Sep 17 00:00:00 2001
|
|
From: Harald Hoyer <harald@redhat.com>
|
|
Date: Thu, 4 Jul 2013 11:01:47 +0200
|
|
Subject: [PATCH 2/6] core/mount.c:mount_dump(): don't segfault, if mount is
|
|
not mounted anymore
|
|
|
|
Don't segfault, if m->from_proc_self_mountinfo and m->from_fragment is
|
|
false.
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=957783#c9
|
|
---
|
|
src/core/mount.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
index 3cc3e65..58a3f11 100644
|
|
--- a/src/core/mount.c
|
|
+++ b/src/core/mount.c
|
|
@@ -822,9 +822,9 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) {
|
|
prefix, mount_state_to_string(m->state),
|
|
prefix, mount_result_to_string(m->result),
|
|
prefix, m->where,
|
|
- prefix, strna(p->what),
|
|
- prefix, strna(p->fstype),
|
|
- prefix, strna(p->options),
|
|
+ prefix, p ? strna(p->what) : "n/a",
|
|
+ prefix, p ? strna(p->fstype) : "n/a",
|
|
+ prefix, p ? strna(p->options) : "n/a",
|
|
prefix, yes_no(m->from_proc_self_mountinfo),
|
|
prefix, yes_no(m->from_fragment),
|
|
prefix, m->directory_mode);
|
|
--
|
|
1.8.1.4
|
|
|