|
Zbigniew Jędrzejewski-Szmek |
436654 |
From 424873fd1c78edd597a02cbf4a402450369b0905 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
From: Daniel Mack <daniel@zonque.org>
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
Date: Thu, 4 Jun 2015 15:39:49 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
Subject: [PATCH] core/mount: skip incomplete mountinfo entries
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
Skip /proc/mountinfo entries for which libmount returns a NULL pointer
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
for 'source' or 'target'. This happened on Semaphore CI's build servers
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
when the test suite is run.
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
(cherry picked from commit c0a7f8d3cb757cf750fc6788df0d215f6457c09d)
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
src/core/mount.c | 3 +++
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
1 file changed, 3 insertions(+)
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
index ba1dcf1e85..851b41351e 100644
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
--- a/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
+++ b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
@@ -1522,6 +1522,9 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
options = mnt_fs_get_options(fs);
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
fstype = mnt_fs_get_fstype(fs);
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
+ if (!device || !path)
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
+ continue;
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
if (cunescape(device, UNESCAPE_RELAX, &d) < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
return log_oom();
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|