Blame SOURCES/fix-coldplug-detection.patch

ff86aa
From 3d38bbb09383a634c78722c7bf18a3e1a3f36647 Mon Sep 17 00:00:00 2001
ff86aa
From: Frederic Crozat <fcrozat@suse.com>
ff86aa
Date: Thu, 19 Jun 2014 17:58:50 +0200
ff86aa
Subject: [PATCH] libply-splash-core: also monitor for file removal in udev
ff86aa
 directory
ff86aa
ff86aa
Ensure plymouth detects coldplug completion with recent udev (>= 213).
ff86aa
---
ff86aa
 src/libply-splash-core/ply-device-manager.c | 2 +-
ff86aa
 1 file changed, 1 insertion(+), 1 deletion(-)
ff86aa
ff86aa
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c
ff86aa
index a7890d0..5766bcb 100644
ff86aa
--- a/src/libply-splash-core/ply-device-manager.c
ff86aa
+++ b/src/libply-splash-core/ply-device-manager.c
ff86aa
@@ -780,61 +780,61 @@ on_udev_queue_changed (ply_device_manager_t *manager)
ff86aa
 
ff86aa
   ply_trace ("udev coldplug complete");
ff86aa
   ply_event_loop_stop_watching_fd (manager->loop, manager->udev_queue_fd_watch);
ff86aa
   manager->udev_queue_fd_watch = NULL;
ff86aa
   udev_queue_unref (manager->udev_queue);
ff86aa
 
ff86aa
   close (manager->udev_queue_fd);
ff86aa
   manager->udev_queue_fd = -1;
ff86aa
 
ff86aa
   manager->udev_queue = NULL;
ff86aa
 
ff86aa
   create_seats_from_udev (manager);
ff86aa
 }
ff86aa
 
ff86aa
 static void
ff86aa
 watch_for_coldplug_completion (ply_device_manager_t *manager)
ff86aa
 {
ff86aa
   int fd;
ff86aa
   int result;
ff86aa
 
ff86aa
   manager->udev_queue = udev_queue_new (manager->udev_context);
ff86aa
 
ff86aa
   if (udev_queue_get_queue_is_empty (manager->udev_queue))
ff86aa
     {
ff86aa
       ply_trace ("udev coldplug completed already ");
ff86aa
       create_seats_from_udev (manager);
ff86aa
       return;
ff86aa
     }
ff86aa
 
ff86aa
   fd = inotify_init1 (IN_CLOEXEC);
ff86aa
-  result = inotify_add_watch (fd, "/run/udev", IN_MOVED_TO);
ff86aa
+  result = inotify_add_watch (fd, "/run/udev", IN_MOVED_TO| IN_DELETE);
ff86aa
 
ff86aa
   if (result < 0)
ff86aa
     {
ff86aa
       ply_trace ("could not watch for udev to show up: %m");
ff86aa
       close (fd);
ff86aa
 
ff86aa
       create_fallback_seat (manager);
ff86aa
       return;
ff86aa
     }
ff86aa
 
ff86aa
   manager->udev_queue_fd = fd;
ff86aa
 
ff86aa
   manager->udev_queue_fd_watch = ply_event_loop_watch_fd (manager->loop,
ff86aa
                                                           fd,
ff86aa
                                                           PLY_EVENT_LOOP_FD_STATUS_HAS_DATA,
ff86aa
                                                           (ply_event_handler_t)
ff86aa
                                                           on_udev_queue_changed,
ff86aa
                                                           NULL,
ff86aa
                                                           manager);
ff86aa
 
ff86aa
 }
ff86aa
 
ff86aa
 void
ff86aa
 ply_device_manager_watch_seats (ply_device_manager_t       *manager,
ff86aa
                                 ply_seat_added_handler_t    seat_added_handler,
ff86aa
                                 ply_seat_removed_handler_t  seat_removed_handler,
ff86aa
                                 void                       *data)
ff86aa
 {
ff86aa
   bool done_with_initial_seat_setup;
ff86aa
 
ff86aa
-- 
ff86aa
2.3.7
ff86aa