Re: [PATCH v2] config: Handle IN_MOVED_TO inotify event

2014-10-22 Thread Patrik Flykt
On Tue, 2014-10-21 at 15:59 +0300, Tomasz Bursztyka wrote:
> If the user moves a .config to /var/lib/connman which happens to be on
> the same fs, this will raise IN_MOVED_FROM/IN_MOVE_TO inotify events
> and not IN_DELETE/IN_CREATE.

Applied, thanks!

Patrik

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH v2] config: Handle IN_MOVED_TO inotify event

2014-10-21 Thread Tomasz Bursztyka
If the user moves a .config to /var/lib/connman which happens to be on
the same fs, this will raise IN_MOVED_FROM/IN_MOVE_TO inotify events
and not IN_DELETE/IN_CREATE.
---
 src/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/config.c b/src/config.c
index 93a788a..e7d1671 100644
--- a/src/config.c
+++ b/src/config.c
@@ -891,7 +891,7 @@ static void config_notify_handler(struct inotify_event 
*event,
return;
}
 
-   if (event->mask & IN_CREATE)
+   if (event->mask & IN_CREATE || event->mask & IN_MOVED_TO)
create_config(ident);
 
if (event->mask & IN_MODIFY) {
-- 
1.8.5.5

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman