pid1: downgrade if we can't make sense of the old device on MOVE uevent
authorLennart Poettering <lennart@poettering.net>
Wed, 2 Jun 2021 13:34:34 +0000 (15:34 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Jul 2021 15:46:45 +0000 (17:46 +0200)
If the name of the old device didn#t work for us, we don't have to clean
anything up, since we know for sure that there won't be a device unit
for it. hence downgrade log message about it.

(cherry picked from commit 4d94c74fae21f7ef02a5f14b8296a4522d6b51df)
(cherry picked from commit 2ff9f3068341433b031ed8f42900bf1460b53ff6)

src/core/device.c

index a3a3bdf15709558f76a8bbec0ed0c29ac10d6c7d..a01b95d0b530de51f98fa1aa4df416df757cbd77 100644 (file)
@@ -938,7 +938,7 @@ static int device_remove_old(Manager *m, sd_device *dev) {
 
         r = unit_name_from_path(syspath_old, ".device", &e);
         if (r < 0)
-                return log_device_error_errno(dev, r, "Failed to generate unit name from old device path: %m");
+                return log_device_debug_errno(dev, r, "Failed to generate unit name from old device path, ignoring: %m");
 
         device_update_found_by_sysfs(m, syspath_old, 0, DEVICE_FOUND_UDEV|DEVICE_FOUND_MOUNT|DEVICE_FOUND_SWAP);
         return 0;