entity_manager: reset the path of ObjectManager

Currently, EntityManager places the ObjectManager at "/". According to
the email thread [1], the org has agreed to put object managers at a
fixed location according to the type of objects.

[1] https://lists.ozlabs.org/pipermail/openbmc/2022-July/031336.html

In commit [2], the org has approved that all inventory items shall have
a object manager at /xyz/openbmc_project/inventory. Thus, this commit
changed EntityManager to respect the convention.

[2] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/55308

The default ObjectManager at root now becomes useless since most objects
move to ObjectManager at /xyz/openbmc_project/inventory. The only object
left at "/" is the EntityManager object isself which only has a "ReScan"
method. According to the discussion in [3], we are okay to remove this
object manager.

[3] https://discord.com/channels/775381525260664832/1018929092009144380/1021827714619015168

Tested: tested on hardware, EM is working correctly, and a new object at
"/xyz/openbmc_project/inventory" appears, which implements the
ObjectManager interfaces.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ic565aa28218275231d020e2cfd77cc5140dfa540
diff --git a/src/entity_manager.cpp b/src/entity_manager.cpp
index bfda895..366414f 100644
--- a/src/entity_manager.cpp
+++ b/src/entity_manager.cpp
@@ -1077,7 +1077,15 @@
     systemBus = std::make_shared<sdbusplus::asio::connection>(io);
     systemBus->request_name("xyz.openbmc_project.EntityManager");
 
-    sdbusplus::asio::object_server objServer(systemBus);
+    // The EntityManager object itself doesn't expose any properties.
+    // No need to set up ObjectManager for the |EntityManager| object.
+    sdbusplus::asio::object_server objServer(systemBus, /*skipManager=*/true);
+
+    // All other objects that EntityManager currently support are under the
+    // inventory subtree.
+    // See the discussion at
+    // https://discord.com/channels/775381525260664832/1018929092009144380
+    objServer.add_manager("/xyz/openbmc_project/inventory");
 
     std::shared_ptr<sdbusplus::asio::dbus_interface> entityIface =
         objServer.add_interface("/xyz/openbmc_project/EntityManager",