device: create units with intended "found" value
authorMartin Pitt <martin.pitt@ubuntu.com>
Sun, 17 May 2015 13:07:47 +0000 (15:07 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 May 2015 11:02:05 +0000 (13:02 +0200)
commit2005219f83130a8d5948b070b132f5dc21400a5f
tree6c30f81c8ddfc523572eb86c7c49de8a660e3b7a
parent139e5336286c37d9d4a2df01931ba0a86abbac69
device: create units with intended "found" value

Change device_found_node() to also create a .device unit if a device is not
known by udev; this is the case for "tentative" devices picked up by mountinfo
(DEVICE_FOUND_MOUNT).  With that we can record the "found" attribute on the
unit.

Change device_setup_unit() to also accept a NULL udev_device, and don't
add the extra udev information in that case.

Previously device_found_node() would not create a .device unit, and
unit_add_node_link() would then create a "dead" stub one via
manager_load_unit(), so we lost the "found" attribute and unmounted everything
from that device.

https://launchpad.net/bugs/1444402
http://lists.freedesktop.org/archives/systemd-devel/2015-May/031658.html
src/core/device.c