mapper: Handle the expected GetSubTreePaths fails
The 'mapper subtree-remove' command calls GetSubTreePaths
when it starts up to check if a certain interface currently
exists on a certain path. If that interface does not exist
on that path, the current ObjectMapper implementation would
just return an empty list, and the program would exit.
The new ObjectMapper implementation will fail the GetSubTreePaths
call in that case, causing an ENXIO inside of sd_event_loop().
This commit checks for the ENXIO and then just exits immediately
with a return code of 0, as this is the case where the interface
had been removed before the program was started.
Change-Id: Iaeb908ee9a0db8952ef77cc63675e0f7abe3b6c7
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
1 file changed