sync_manager: Add callback to do rsync

Call rsync when the subscribed file or directory is modified or
deleted. Don't create error logs as syncing is used for backup
and does not affect the system's operation. Any errors will be
logged into the journal.

Closes openbmc/openbmc#2918

Change-Id: I2671f0afd2924c15ea883d4d037c641c6e9680b4
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/sync_watch.hpp b/sync_watch.hpp
index a7f8557..4303671 100644
--- a/sync_watch.hpp
+++ b/sync_watch.hpp
@@ -29,7 +29,7 @@
      *  @param[in] syncCallback - The callback function for processing
      *                            files
      */
-    SyncWatch(sd_event& loop, std::function<int(fs::path&)> syncCallback);
+    SyncWatch(sd_event& loop, std::function<int(int, fs::path&)> syncCallback);
 
     SyncWatch(const SyncWatch&) = delete;
     SyncWatch& operator=(const SyncWatch&) = delete;
@@ -58,7 +58,7 @@
     std::map<fd, std::map<wd, fs::path>> fileMap;
 
     /** @brief The callback function for processing the inotify event */
-    std::function<int(fs::path&)> syncCallback;
+    std::function<int(int, fs::path&)> syncCallback;
 };
 
 } // namespace manager