commit | f78215fd896ac2d7e3d3e9c6f739bf25da93c921 | [log] [tgz] |
---|---|---|
author | John Wedig <johnwedig@google.com> | Tue Jun 07 13:39:22 2022 -0700 |
committer | John Wedig <johnwedig@google.com> | Tue Jun 07 16:46:31 2022 -0700 |
tree | 40925210ee2b592e298380a379f65f0e03f29a68 | |
parent | 91c1ec1bdd87839aaea11e5751282c820574f943 [diff] |
Fix code to search for MMC device The findDevice() function is broken currently because it's looking for a device in sysfs with the name of mmcblk*. The problem is that the boot partitions are also showing up in sysfs (mmcblk0boot0 and mmcblk0boot1), and the findDevice() function is getting confused. Instead of relying on the name of the device to find the MMC device, we now look at the following entry in sysfs, to make sure we found an MMC device: /sys/block/<dev_name>/device/type The contents of that file should be MMC. Tested: Ran eStoraged on a machine to confirm that it created a D-Bus object with the mmcblk0 device, instead of mmcblk0boot0. $ busctl tree xyz.openbmc_project.eStoraged `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/inventory `-/xyz/openbmc_project/inventory/storage `-/xyz/openbmc_project/inventory/storage/mmcblk0 Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: I786934fcdc950b55c62bc7e3784e29d5ba73099f
This daemon serves as an abstraction for an encrypted storage device, encapsulating the security functionality and providing a D-Bus interface to manage the encrypted filesystem on the device. Using the D-Bus interface, other software components can interact with eStoraged to do things like create a new encrypted filesystem, wipe its contents, lock/unlock the device, or change the password.