chiark / gitweb /
systemctl: allow globbing in commands which take multiple unit names
[elogind.git] / src / core / device.c
index 4ff7c37238a566b641e0ae87bb9f300dc6a156f7..d3976c9d47314ebf475d0e7c10a4395252ed9ad1 100644 (file)
@@ -268,7 +268,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
                                 memcpy(e, w, l);
                                 e[l] = 0;
 
-                                n = unit_name_mangle(e);
+                                n = unit_name_mangle(e, false);
                                 if (!n) {
                                         r = -ENOMEM;
                                         goto fail;
@@ -549,6 +549,10 @@ static int device_enumerate(Manager *m) {
         if (r < 0)
                 goto fail;
 
+        r = udev_enumerate_add_match_is_initialized(e);
+        if (r < 0)
+                goto fail;
+
         r = udev_enumerate_scan_devices(e);
         if (r < 0)
                 goto fail;
@@ -649,7 +653,6 @@ const UnitVTable device_vtable = {
         .sub_state_to_string = device_sub_state_to_string,
 
         .bus_interface = "org.freedesktop.systemd1.Device",
-        .bus_changing_properties = bus_device_changing_properties,
         .bus_vtable = bus_device_vtable,
 
         .following = device_following,