|
Zbigniew Jędrzejewski-Szmek |
d044ab |
From 713917bd94272fc65d94016a208b72309ae1320a Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
From: NeilBrown <neil@brown.name>
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
Date: Mon, 17 Jul 2017 18:03:34 +1000
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
Subject: [PATCH] fstab-generator: ignore x-systemd.device-timeout for
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
non-devices (#6368)
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
If you specify "x-systemd.device-timeout" for an NFS mount
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
point, you get no warning and a meaningless device unit
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
dependency created.
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
Better to have a warning and no dependency.
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
(cherry picked from commit c67bd1f758f087496741ce0b3e227d82c6b4a304)
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
---
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
src/shared/generator.c | 4 ++++
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
1 file changed, 4 insertions(+)
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
diff --git a/src/shared/generator.c b/src/shared/generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
index 6a78ebbda7..6a887e3aad 100644
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
--- a/src/shared/generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+++ b/src/shared/generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
@@ -182,6 +182,10 @@ int generator_write_timeouts(
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
node = fstab_node_to_udev_node(what);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
if (!node)
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
return log_oom();
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+ if (!is_device_path(node)) {
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+ log_warning("x-systemd.device-timeout ignored for %s", what);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+ return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
+ }
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
r = unit_name_from_path(node, ".device", &unit);
|
|
Zbigniew Jędrzejewski-Szmek |
d044ab |
if (r < 0)
|