[PATCH 08/34] dm: core: Add a function to see if a device exists