Add vport_trigger tool.

This tool reads any /sys/class/virtio-ports/vportXpY/name files and sets
up mirror properties in the format sys.cf.ser.<name> to specify the path
to device node like /dev/vportXpY.

The properties can be used as triggers to create symlinks to the desired
files and start the affected services. If the device nodes are already
the same name as the sysfs 'name' files, this tool has no effect.

This replaces a workaround in the kernel that renamed the virtio_serial
devices to the contents of the sysfs 'name' file, which is not an
upstreamable change.

Bug: 77656836
(cherry picked from commit 90ab2150b53ce35564dbf8f7d670d05eecdc3387)

Change-Id: I31b1f8c62782e906cdc084ec5fc97e95facab3b6
2 files changed
tree: 947727471625f6cef24a94325d4bcf36e1a7a13d
  1. common/
  2. guest/
  3. host/
  4. tools/
  5. Android.bp
  6. Android.mk
  7. OWNERS