|
|
1ab4435 |
From 659773964a8e0b00e24f465b3b3a1fa6ca3bf54a Mon Sep 17 00:00:00 2001
|
|
|
1ab4435 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
1ab4435 |
Date: Thu, 4 Jul 2013 11:01:47 +0200
|
|
|
1ab4435 |
Subject: [PATCH] core/mount.c:mount_dump(): don't segfault, if mount is not
|
|
|
1ab4435 |
mounted anymore
|
|
|
1ab4435 |
|
|
|
1ab4435 |
Don't segfault, if m->from_proc_self_mountinfo and m->from_fragment is
|
|
|
1ab4435 |
false.
|
|
|
1ab4435 |
|
|
|
1ab4435 |
https://bugzilla.redhat.com/show_bug.cgi?id=957783#c9
|
|
|
1ab4435 |
---
|
|
|
1ab4435 |
src/core/mount.c | 6 +++---
|
|
|
1ab4435 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
1ab4435 |
|
|
|
1ab4435 |
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
|
674ca7d |
index 605c56d26d..85f500005d 100644
|
|
|
1ab4435 |
--- a/src/core/mount.c
|
|
|
1ab4435 |
+++ b/src/core/mount.c
|
|
|
1ab4435 |
@@ -820,9 +820,9 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) {
|
|
|
1ab4435 |
prefix, mount_state_to_string(m->state),
|
|
|
1ab4435 |
prefix, mount_result_to_string(m->result),
|
|
|
1ab4435 |
prefix, m->where,
|
|
|
1ab4435 |
- prefix, strna(p->what),
|
|
|
1ab4435 |
- prefix, strna(p->fstype),
|
|
|
1ab4435 |
- prefix, strna(p->options),
|
|
|
1ab4435 |
+ prefix, p ? strna(p->what) : "n/a",
|
|
|
1ab4435 |
+ prefix, p ? strna(p->fstype) : "n/a",
|
|
|
1ab4435 |
+ prefix, p ? strna(p->options) : "n/a",
|
|
|
1ab4435 |
prefix, yes_no(m->from_proc_self_mountinfo),
|
|
|
1ab4435 |
prefix, yes_no(m->from_fragment),
|
|
|
1ab4435 |
prefix, m->directory_mode);
|