Set MIST_SUPPORTED_DEVICE=1 on tty devices associated with supported modems.

This CL modifies 51-mist.rules to also set MIST_SUPPORTED_DEVICE=1 on
the tty devices associated with the modems supported by mist. This
allows 52-mm-modem-permissions.rules to determine if a tty device is
associated with a supported modem and set the appropriate permissions on
the tty device.

BUG=chromium:333962
TEST=Tested the following:
1. Build and run unit tests.
2. Insert a supported 3G dongle and verify that mist is invoked to
   switch the dongle into a modem. Also verify using the following
   command that udev sets MIST_SUPPORTED_DEVICE=1 on the 'usb_device'
   device associated with the dongle when it's added to the system and
   after it's switched to the modem mode, and also on the 'tty' device
   associated with the dongle after it's switched to the modem mode.

   udevadm monitor --property

Change-Id: Ied0ba59f0803e6316b8d2b2111abbcf5d5977485
Reviewed-on: https://chromium-review.googlesource.com/182678
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
1 file changed
tree: b7ecae701de72b5700a786f94808b633ab4bef6d
  1. proto/
  2. 51-mist.rules
  3. common.mk
  4. config_loader.cc
  5. config_loader.h
  6. config_loader_unittest.cc
  7. context.cc
  8. context.h
  9. default.conf
  10. event_dispatcher.cc
  11. event_dispatcher.h
  12. event_dispatcher_unittest.cc
  13. LICENSE
  14. main.cc
  15. Makefile
  16. metrics.cc
  17. metrics.h
  18. mist.cc
  19. mist.gyp
  20. mist.h
  21. mock_config_loader.cc
  22. mock_config_loader.h
  23. mock_context.cc
  24. mock_context.h
  25. mock_udev.cc
  26. mock_udev.h
  27. mock_udev_device.cc
  28. mock_udev_device.h
  29. mock_udev_enumerate.cc
  30. mock_udev_enumerate.h
  31. mock_udev_list_entry.cc
  32. mock_udev_list_entry.h
  33. mock_udev_monitor.cc
  34. mock_udev_monitor.h
  35. mock_usb_device_event_observer.cc
  36. mock_usb_device_event_observer.h
  37. OWNERS
  38. README
  39. testrunner.cc
  40. udev.cc
  41. udev.h
  42. udev_device.cc
  43. udev_device.h
  44. udev_enumerate.cc
  45. udev_enumerate.h
  46. udev_list_entry.cc
  47. udev_list_entry.h
  48. udev_monitor.cc
  49. udev_monitor.h
  50. usb_bulk_transfer.cc
  51. usb_bulk_transfer.h
  52. usb_config_descriptor.cc
  53. usb_config_descriptor.h
  54. usb_config_descriptor_unittest.cc
  55. usb_constants.cc
  56. usb_constants.h
  57. usb_constants_unittest.cc
  58. usb_device.cc
  59. usb_device.h
  60. usb_device_descriptor.cc
  61. usb_device_descriptor.h
  62. usb_device_descriptor_unittest.cc
  63. usb_device_event_notifier.cc
  64. usb_device_event_notifier.h
  65. usb_device_event_notifier_unittest.cc
  66. usb_device_event_observer.h
  67. usb_endpoint_descriptor.cc
  68. usb_endpoint_descriptor.h
  69. usb_endpoint_descriptor_unittest.cc
  70. usb_error.cc
  71. usb_error.h
  72. usb_error_unittest.cc
  73. usb_interface.cc
  74. usb_interface.h
  75. usb_interface_descriptor.cc
  76. usb_interface_descriptor.h
  77. usb_interface_descriptor_unittest.cc
  78. usb_manager.cc
  79. usb_manager.h
  80. usb_modem_one_shot_switcher.cc
  81. usb_modem_one_shot_switcher.h
  82. usb_modem_switch_context.cc
  83. usb_modem_switch_context.h
  84. usb_modem_switch_context_unittest.cc
  85. usb_modem_switch_operation.cc
  86. usb_modem_switch_operation.h
  87. usb_modem_switcher.cc
  88. usb_modem_switcher.h
  89. usb_transfer.cc
  90. usb_transfer.h
  91. usb_transfer_unittest.cc