[systemd-commits] 2 commits - Makefile.am rules/80-net-setup-link.rules src/udev

Tom Gundersen tomegun at kemper.freedesktop.org
Tue Sep 9 06:39:44 PDT 2014


 Makefile.am                   |   27 +++++++++++++--------------
 rules/80-net-setup-link.rules |    2 --
 src/udev/udev-event.c         |   16 ++++++++++++++++
 3 files changed, 29 insertions(+), 16 deletions(-)

New commits:
commit b081b27e1433cdc7ac72b25ae8b4db887d79187f
Author: Tom Gundersen <teg at jklm.no>
Date:   Tue Sep 9 12:23:19 2014 +0200

    udev: import the full db on MOVE events for devices without dev_t

diff --git a/rules/80-net-setup-link.rules b/rules/80-net-setup-link.rules
index 4207694..6e411a9 100644
--- a/rules/80-net-setup-link.rules
+++ b/rules/80-net-setup-link.rules
@@ -4,8 +4,6 @@ SUBSYSTEM!="net", GOTO="net_setup_link_end"
 
 IMPORT{builtin}="path_id"
 
-ACTION=="move", IMPORT{db}="ID_NET_DRIVER", IMPORT{db}="ID_NET_LINK_FILE", IMPORT{db}="ID_NET_NAME"
-
 ACTION!="add", GOTO="net_setup_link_end"
 
 IMPORT{builtin}="net_setup_link"
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 00cd6d4..18b92ca 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -805,6 +805,22 @@ void udev_event_execute_rules(struct udev_event *event,
                                 udev_watch_end(event->udev, event->dev_db);
                 }
 
+                if (major(udev_device_get_devnum(dev)) == 0 &&
+                    streq(udev_device_get_action(dev), "move")) {
+                        struct udev_list_entry *entry;
+
+                        for ((entry = udev_device_get_properties_list_entry(event->dev_db)); entry; entry = udev_list_entry_get_next(entry)) {
+                                const char *key, *value;
+                                struct udev_list_entry *property;
+
+                                key = udev_list_entry_get_name(entry);
+                                value = udev_list_entry_get_value(entry);
+
+                                property = udev_device_add_property(event->dev, key, value);
+                                udev_list_entry_set_num(property, true);
+                        }
+                }
+
                 udev_rules_apply_to_event(rules, event, timeout_usec, sigmask);
 
                 /* rename a new network interface, if needed */

commit 72ba9f04f95bc6eda1e32fdd21ea56476713a5bc
Author: Ivan Shapovalov <intelfx100 at gmail.com>
Date:   Tue Sep 9 01:40:51 2014 +0400

    build-sys: make hibernation support configure option also handle hybrid-sleep; fix indentation

diff --git a/Makefile.am b/Makefile.am
index 35c877f..de40043 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -459,7 +459,6 @@ dist_systemunit_DATA = \
 	units/network-online.target \
 	units/nss-lookup.target \
 	units/nss-user-lookup.target \
-	units/hybrid-sleep.target \
 	units/poweroff.target \
 	units/reboot.target \
 	units/rescue.target \
@@ -523,7 +522,6 @@ nodist_systemunit_DATA = \
 	units/emergency.service \
 	units/rescue.service \
 	units/user at .service \
-	units/systemd-hybrid-sleep.service \
 	units/systemd-suspend.service \
 	units/systemd-halt.service \
 	units/systemd-poweroff.service \
@@ -579,7 +577,6 @@ EXTRA_DIST += \
 	units/systemd-fsck-root.service.in \
 	units/user at .service.in \
 	units/debug-shell.service.in \
-	units/systemd-hybrid-sleep.service.in \
 	units/systemd-suspend.service.in \
 	units/quotaon.service.in \
 	units/initrd-parse-etc.service.in \
@@ -2159,17 +2156,17 @@ systemd_system_update_generator_LDADD = \
 # ------------------------------------------------------------------------------
 if ENABLE_HIBERNATE
 systemgenerator_PROGRAMS += \
-        systemd-hibernate-resume-generator
+	systemd-hibernate-resume-generator
 
 rootlibexec_PROGRAMS += \
-        systemd-hibernate-resume
+	systemd-hibernate-resume
 
 systemd_hibernate_resume_SOURCES = \
-        src/hibernate-resume/hibernate-resume.c
+	src/hibernate-resume/hibernate-resume.c
 
 systemd_hibernate_resume_LDADD = \
-        libsystemd-internal.la \
-        libsystemd-shared.la
+	libsystemd-internal.la \
+	libsystemd-shared.la
 
 systemd_hibernate_resume_generator_SOURCES = \
 	src/hibernate-resume/hibernate-resume-generator.c
@@ -2179,16 +2176,18 @@ systemd_hibernate_resume_generator_LDADD = \
 	libsystemd-shared.la
 
 EXTRA_DIST += \
-        units/systemd-hibernate.service.in \
-        units/systemd-hibernate-resume at .service.in
+	units/systemd-hibernate.service.in \
+	units/systemd-hibernate-resume at .service.in \
+	units/systemd-hybrid-sleep.service.in
 
 dist_systemunit_DATA += \
-        units/hibernate.target
+	units/hibernate.target \
+	units/hybrid-sleep.target
 
 nodist_systemunit_DATA += \
-        units/systemd-hibernate.service \
-        units/systemd-hibernate-resume at .service
-
+	units/systemd-hibernate.service \
+	units/systemd-hibernate-resume at .service \
+	units/systemd-hybrid-sleep.service
 endif
 
 # ------------------------------------------------------------------------------



More information about the systemd-commits mailing list