ueventd: populate /dev/block/mapper link

Since DM_NAME= is not sent (delete bug) or interpreted with ueventd
message, instead probe /sys/devices/virtual/block/dm-X/dm/name when
instantiating.  Cache the value for later delete.

By creating the /dev/block/mapper/<name> nodes, this will give
selabel_lookup_best_match an alias to hang its hat on so that the
associated /dev/block/dm-X nodes will be suitably labelled and
differentiated.

NB: For Android, the deletion of the nodes will only happen in the
    context of fastbootd, update_engine and gsid; otherwise the links
    and properties created can be considered set-once and persistent.

Test: manual inspect /dev/block/mapper/ links
Bug: 124072565
Change-Id: I6d9e467970dfdad7b67754ad61084964251eb05f
1 file changed