Add '--action=add' to udevadm trigger command
authorGeoff Levand <geoff@infradead.org>
Sat, 18 Feb 2012 22:54:21 +0000 (14:54 -0800)
committerGeoff Levand <geoff@infradead.org>
Fri, 24 Feb 2012 20:38:45 +0000 (12:38 -0800)
Signed-off-by: Geoff Levand <geoff@infradead.org>
discover/udev.c

index 1a527895878d4de36f17406c3fe7ad44c1ceb07d..bc0282749fe282521c15017dbff539a69527866c 100644 (file)
@@ -54,6 +54,8 @@ static void udev_handle_message(struct udev *udev, char *buf, int len)
        event = talloc(udev, struct event);
        event->type = EVENT_TYPE_UDEV;
 
+       pb_log("%s\n", buf);
+
        result = event_parse_ad_message(event, buf, len);
 
        if (result)
@@ -137,7 +139,7 @@ out_err:
 
 int udev_trigger(struct udev __attribute__((unused)) *udev)
 {
-       int rc = system("/sbin/udevadm trigger --subsystem-match=block");
+       int rc = system("/sbin/udevadm trigger --subsystem-match=block --action=add");
 
        if (rc)
                pb_log("udev trigger failed: %d (%d)\n", rc, WEXITSTATUS(rc));