{"action":"created","comment":{"url":"https://api.github.com/repos/hughsie/fwupd/pulls/comments/213429683","pull_request_review_id":150264515,"id":213429683,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzQyOTY4Mw==","diff_hunk":"@@ -39,18 +37,108 @@ synapticsmst_common_check_supported_system (FuPlugin *plugin, GError **error)\n \treturn TRUE;\n }\n \n+/* creates MST-$str-$BOARDID */\n+static void\n+fu_plugin_synapticsmst_create_simple_guid (FuDevice *fu_device,\n+\t\t\t\t\t   SynapticsMSTDevice *device,\n+\t\t\t\t\t   const gchar *str)\n+{\n+\tguint32 board_id = synapticsmst_device_get_board_id (device);\n+\tg_autofree gchar *guid = g_strdup_printf (\"MST-%s-%u\", str, board_id);\n+\n+\tfu_device_add_guid (fu_device, guid);\n+}\n+\n+/* creates MST-$str-$chipid-$BOARDID */\n+static void\n+fu_plugin_synapticsmst_create_complex_guid (FuDevice *fu_device,\n+\t\t\t\t\t    SynapticsMSTDevice *device,\n+\t\t\t\t\t    const gchar *str)\n+{\n+\tconst gchar *chip_id_str = synapticsmst_device_get_chip_id_str (device);\n+\tg_autofree gchar *chip_id_down = g_ascii_strdown (chip_id_str, -1);\n+\tg_autofree gchar *tmp = g_strdup_printf (\"%s-%s\", str, chip_id_down);\n+\n+\tfu_plugin_synapticsmst_create_simple_guid (fu_device, device, tmp);\n+}\n+\n+static gboolean\n+fu_plugin_synapticsmst_lookup_device (FuPlugin *plugin,\n+\t\t\t\t      FuDevice *fu_device,\n+\t\t\t\t      SynapticsMSTDevice *device,\n+\t\t\t\t      GError **error)\n+{\n+\tconst gchar *board_str;\n+\tconst gchar *guid_template;\n+\tguint32 board_id = synapticsmst_device_get_board_id (device);\n+\tconst gchar *chip_id_str = synapticsmst_device_get_chip_id_str (device);\n+\tg_autofree gchar *group = NULL;\n+\tg_autofree gchar *name = NULL;\n+\n+\t/* GUIDs used only for test mode */\n+\tif (g_getenv (\"FWUPD_SYNAPTICSMST_FW_DIR\") != NULL) {\n+\t\tg_autofree gchar *tmp = NULL;\n+\t\ttmp = g_strdup_printf (\"test-%s\", chip_id_str);\n+\t\tfu_plugin_synapticsmst_create_simple_guid (fu_device, device, tmp);\n+\t\treturn TRUE;\n+\t}\n+\n+\t/* Set up the device name (prefer quirks) */\n+\tgroup = g_strdup_printf (\"SynapticsMSTBoardID=%u\", board_id);\n+\tboard_str = fu_plugin_lookup_quirk_by_id (plugin, group,\n+\t\t\t\t\t      FU_QUIRKS_NAME);\n+\tif (board_str == NULL) {\n+\t\tif ((board_id >> 8) == CUSTOMERID_DELL)","path":"plugins/synapticsmst/fu-plugin-synapticsmst.c","position":71,"original_position":71,"commit_id":"a36103a3bf3a7c741c4d1ae9ccf2cf21f9f67c3e","original_commit_id":"2bfd0b60c6dfcb970e97a89ff51c22b5f1502a61","user":{"login":"superm1","id":494526,"node_id":"MDQ6VXNlcjQ5NDUyNg==","avatar_url":"https://avatars0.githubusercontent.com/u/494526?v=4","gravatar_id":"","url":"https://api.github.com/users/superm1","html_url":"https://github.com/superm1","followers_url":"https://api.github.com/users/superm1/followers","following_url":"https://api.github.com/users/superm1/following{/other_user}","gists_url":"https://api.github.com/users/superm1/gists{/gist_id}","starred_url":"https://api.github.com/users/superm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superm1/subscriptions","organizations_url":"https://api.github.com/users/superm1/orgs","repos_url":"https://api.github.com/users/superm1/repos","events_url":"https://api.github.com/users/superm1/events{/privacy}","received_events_url":"https://api.github.com/users/superm1/received_events","type":"User","site_admin":false},"body":"I guess you're right - it would just show up as \"unknown platform\" then.  The customerid_dell isn't really useful in this case now.","created_at":"2018-08-28T18:44:41Z","updated_at":"2018-08-28T18:44:41Z","html_url":"https://github.com/hughsie/fwupd/pull/692#discussion_r213429683","pull_request_url":"https://api.github.com/repos/hughsie/fwupd/pulls/692","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/hughsie/fwupd/pulls/comments/213429683"},"html":{"href":"https://github.com/hughsie/fwupd/pull/692#discussion_r213429683"},"pull_request":{"href":"https://api.github.com/repos/hughsie/fwupd/pulls/692"}},"in_reply_to_id":213429278},"pull_request":{"url":"https://api.github.com/repos/hughsie/fwupd/pulls/692","id":211507575,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNTA3NTc1","html_url":"https://github.com/hughsie/fwupd/pull/692","diff_url":"https://github.com/hughsie/fwupd/pull/692.diff","patch_url":"https://github.com/hughsie/fwupd/pull/692.patch","issue_url":"https://api.github.com/repos/hughsie/fwupd/issues/692","number":692,"state":"open","locked":false,"title":"synapticsmst: Move GUID generation into quirks","user":{"login":"superm1","id":494526,"node_id":"MDQ6VXNlcjQ5NDUyNg==","avatar_url":"https://avatars0.githubusercontent.com/u/494526?v=4","gravatar_id":"","url":"https://api.github.com/users/superm1","html_url":"https://github.com/superm1","followers_url":"https://api.github.com/users/superm1/followers","following_url":"https://api.github.com/users/superm1/following{/other_user}","gists_url":"https://api.github.com/users/superm1/gists{/gist_id}","starred_url":"https://api.github.com/users/superm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superm1/subscriptions","organizations_url":"https://api.github.com/users/superm1/orgs","repos_url":"https://api.github.com/users/superm1/repos","events_url":"https://api.github.com/users/superm1/events{/privacy}","received_events_url":"https://api.github.com/users/superm1/received_events","type":"User","site_admin":false},"body":"This should allow trivially adding support for new\r\nTesla/Leaf/Panamera devices by a quirk.","created_at":"2018-08-28T17:58:13Z","updated_at":"2018-08-28T18:44:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"745a582276c540251896c8217568adf978efaa74","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hughsie/fwupd/pulls/692/commits","review_comments_url":"https://api.github.com/repos/hughsie/fwupd/pulls/692/comments","review_comment_url":"https://api.github.com/repos/hughsie/fwupd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hughsie/fwupd/issues/692/comments","statuses_url":"https://api.github.com/repos/hughsie/fwupd/statuses/a36103a3bf3a7c741c4d1ae9ccf2cf21f9f67c3e","head":{"label":"hughsie:wip/superm1/synaptics-quirks","ref":"wip/superm1/synaptics-quirks","sha":"a36103a3bf3a7c741c4d1ae9ccf2cf21f9f67c3e","user":{"login":"hughsie","id":151380,"node_id":"MDQ6VXNlcjE1MTM4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/151380?v=4","gravatar_id":"","url":"https://api.github.com/users/hughsie","html_url":"https://github.com/hughsie","followers_url":"https://api.github.com/users/hughsie/followers","following_url":"https://api.github.com/users/hughsie/following{/other_user}","gists_url":"https://api.github.com/users/hughsie/gists{/gist_id}","starred_url":"https://api.github.com/users/hughsie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughsie/subscriptions","organizations_url":"https://api.github.com/users/hughsie/orgs","repos_url":"https://api.github.com/users/hughsie/repos","events_url":"https://api.github.com/users/hughsie/events{/privacy}","received_events_url":"https://api.github.com/users/hughsie/received_events","type":"User","site_admin":false},"repo":{"id":31374735,"node_id":"MDEwOlJlcG9zaXRvcnkzMTM3NDczNQ==","name":"fwupd","full_name":"hughsie/fwupd","owner":{"login":"hughsie","id":151380,"node_id":"MDQ6VXNlcjE1MTM4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/151380?v=4","gravatar_id":"","url":"https://api.github.com/users/hughsie","html_url":"https://github.com/hughsie","followers_url":"https://api.github.com/users/hughsie/followers","following_url":"https://api.github.com/users/hughsie/following{/other_user}","gists_url":"https://api.github.com/users/hughsie/gists{/gist_id}","starred_url":"https://api.github.com/users/hughsie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughsie/subscriptions","organizations_url":"https://api.github.com/users/hughsie/orgs","repos_url":"https://api.github.com/users/hughsie/repos","events_url":"https://api.github.com/users/hughsie/events{/privacy}","received_events_url":"https://api.github.com/users/hughsie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hughsie/fwupd","description":"A simple daemon to allow session software to update firmware","fork":false,"url":"https://api.github.com/repos/hughsie/fwupd","forks_url":"https://api.github.com/repos/hughsie/fwupd/forks","keys_url":"https://api.github.com/repos/hughsie/fwupd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hughsie/fwupd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hughsie/fwupd/teams","hooks_url":"https://api.github.com/repos/hughsie/fwupd/hooks","issue_events_url":"https://api.github.com/repos/hughsie/fwupd/issues/events{/number}","events_url":"https://api.github.com/repos/hughsie/fwupd/events","assignees_url":"https://api.github.com/repos/hughsie/fwupd/assignees{/user}","branches_url":"https://api.github.com/repos/hughsie/fwupd/branches{/branch}","tags_url":"https://api.github.com/repos/hughsie/fwupd/tags","blobs_url":"https://api.github.com/repos/hughsie/fwupd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hughsie/fwupd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hughsie/fwupd/git/refs{/sha}","trees_url":"https://api.github.com/repos/hughsie/fwupd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hughsie/fwupd/statuses/{sha}","languages_url":"https://api.github.com/repos/hughsie/fwupd/languages","stargazers_url":"https://api.github.com/repos/hughsie/fwupd/stargazers","contributors_url":"https://api.github.com/repos/hughsie/fwupd/contributors","subscribers_url":"https://api.github.com/repos/hughsie/fwupd/subscribers","subscription_url":"https://api.github.com/repos/hughsie/fwupd/subscription","commits_url":"https://api.github.com/repos/hughsie/fwupd/commits{/sha}","git_commits_url":"https://api.github.com/repos/hughsie/fwupd/git/commits{/sha}","comments_url":"https://api.github.com/repos/hughsie/fwupd/comments{/number}","issue_comment_url":"https://api.github.com/repos/hughsie/fwupd/issues/comments{/number}","contents_url":"https://api.github.com/repos/hughsie/fwupd/contents/{+path}","compare_url":"https://api.github.com/repos/hughsie/fwupd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hughsie/fwupd/merges","archive_url":"https://api.github.com/repos/hughsie/fwupd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hughsie/fwupd/downloads","issues_url":"https://api.github.com/repos/hughsie/fwupd/issues{/number}","pulls_url":"https://api.github.com/repos/hughsie/fwupd/pulls{/number}","milestones_url":"https://api.github.com/repos/hughsie/fwupd/milestones{/number}","notifications_url":"https://api.github.com/repos/hughsie/fwupd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hughsie/fwupd/labels{/name}","releases_url":"https://api.github.com/repos/hughsie/fwupd/releases{/id}","deployments_url":"https://api.github.com/repos/hughsie/fwupd/deployments","created_at":"2015-02-26T15:52:25Z","updated_at":"2018-08-28T18:39:13Z","pushed_at":"2018-08-28T18:28:14Z","git_url":"git://github.com/hughsie/fwupd.git","ssh_url":"git@github.com:hughsie/fwupd.git","clone_url":"https://github.com/hughsie/fwupd.git","svn_url":"https://github.com/hughsie/fwupd","homepage":"","size":8247,"stargazers_count":370,"watchers_count":370,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":73,"open_issues":23,"watchers":370,"default_branch":"master"}},"base":{"label":"hughsie:master","ref":"master","sha":"7555738827ddc3f7fb0c5dbce3f3a0778dea90c8","user":{"login":"hughsie","id":151380,"node_id":"MDQ6VXNlcjE1MTM4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/151380?v=4","gravatar_id":"","url":"https://api.github.com/users/hughsie","html_url":"https://github.com/hughsie","followers_url":"https://api.github.com/users/hughsie/followers","following_url":"https://api.github.com/users/hughsie/following{/other_user}","gists_url":"https://api.github.com/users/hughsie/gists{/gist_id}","starred_url":"https://api.github.com/users/hughsie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughsie/subscriptions","organizations_url":"https://api.github.com/users/hughsie/orgs","repos_url":"https://api.github.com/users/hughsie/repos","events_url":"https://api.github.com/users/hughsie/events{/privacy}","received_events_url":"https://api.github.com/users/hughsie/received_events","type":"User","site_admin":false},"repo":{"id":31374735,"node_id":"MDEwOlJlcG9zaXRvcnkzMTM3NDczNQ==","name":"fwupd","full_name":"hughsie/fwupd","owner":{"login":"hughsie","id":151380,"node_id":"MDQ6VXNlcjE1MTM4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/151380?v=4","gravatar_id":"","url":"https://api.github.com/users/hughsie","html_url":"https://github.com/hughsie","followers_url":"https://api.github.com/users/hughsie/followers","following_url":"https://api.github.com/users/hughsie/following{/other_user}","gists_url":"https://api.github.com/users/hughsie/gists{/gist_id}","starred_url":"https://api.github.com/users/hughsie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughsie/subscriptions","organizations_url":"https://api.github.com/users/hughsie/orgs","repos_url":"https://api.github.com/users/hughsie/repos","events_url":"https://api.github.com/users/hughsie/events{/privacy}","received_events_url":"https://api.github.com/users/hughsie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hughsie/fwupd","description":"A simple daemon to allow session software to update firmware","fork":false,"url":"https://api.github.com/repos/hughsie/fwupd","forks_url":"https://api.github.com/repos/hughsie/fwupd/forks","keys_url":"https://api.github.com/repos/hughsie/fwupd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hughsie/fwupd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hughsie/fwupd/teams","hooks_url":"https://api.github.com/repos/hughsie/fwupd/hooks","issue_events_url":"https://api.github.com/repos/hughsie/fwupd/issues/events{/number}","events_url":"https://api.github.com/repos/hughsie/fwupd/events","assignees_url":"https://api.github.com/repos/hughsie/fwupd/assignees{/user}","branches_url":"https://api.github.com/repos/hughsie/fwupd/branches{/branch}","tags_url":"https://api.github.com/repos/hughsie/fwupd/tags","blobs_url":"https://api.github.com/repos/hughsie/fwupd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hughsie/fwupd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hughsie/fwupd/git/refs{/sha}","trees_url":"https://api.github.com/repos/hughsie/fwupd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hughsie/fwupd/statuses/{sha}","languages_url":"https://api.github.com/repos/hughsie/fwupd/languages","stargazers_url":"https://api.github.com/repos/hughsie/fwupd/stargazers","contributors_url":"https://api.github.com/repos/hughsie/fwupd/contributors","subscribers_url":"https://api.github.com/repos/hughsie/fwupd/subscribers","subscription_url":"https://api.github.com/repos/hughsie/fwupd/subscription","commits_url":"https://api.github.com/repos/hughsie/fwupd/commits{/sha}","git_commits_url":"https://api.github.com/repos/hughsie/fwupd/git/commits{/sha}","comments_url":"https://api.github.com/repos/hughsie/fwupd/comments{/number}","issue_comment_url":"https://api.github.com/repos/hughsie/fwupd/issues/comments{/number}","contents_url":"https://api.github.com/repos/hughsie/fwupd/contents/{+path}","compare_url":"https://api.github.com/repos/hughsie/fwupd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hughsie/fwupd/merges","archive_url":"https://api.github.com/repos/hughsie/fwupd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hughsie/fwupd/downloads","issues_url":"https://api.github.com/repos/hughsie/fwupd/issues{/number}","pulls_url":"https://api.github.com/repos/hughsie/fwupd/pulls{/number}","milestones_url":"https://api.github.com/repos/hughsie/fwupd/milestones{/number}","notifications_url":"https://api.github.com/repos/hughsie/fwupd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hughsie/fwupd/labels{/name}","releases_url":"https://api.github.com/repos/hughsie/fwupd/releases{/id}","deployments_url":"https://api.github.com/repos/hughsie/fwupd/deployments","created_at":"2015-02-26T15:52:25Z","updated_at":"2018-08-28T18:39:13Z","pushed_at":"2018-08-28T18:28:14Z","git_url":"git://github.com/hughsie/fwupd.git","ssh_url":"git@github.com:hughsie/fwupd.git","clone_url":"https://github.com/hughsie/fwupd.git","svn_url":"https://github.com/hughsie/fwupd","homepage":"","size":8247,"stargazers_count":370,"watchers_count":370,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":73,"open_issues":23,"watchers":370,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hughsie/fwupd/pulls/692"},"html":{"href":"https://github.com/hughsie/fwupd/pull/692"},"issue":{"href":"https://api.github.com/repos/hughsie/fwupd/issues/692"},"comments":{"href":"https://api.github.com/repos/hughsie/fwupd/issues/692/comments"},"review_comments":{"href":"https://api.github.com/repos/hughsie/fwupd/pulls/692/comments"},"review_comment":{"href":"https://api.github.com/repos/hughsie/fwupd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hughsie/fwupd/pulls/692/commits"},"statuses":{"href":"https://api.github.com/repos/hughsie/fwupd/statuses/a36103a3bf3a7c741c4d1ae9ccf2cf21f9f67c3e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"superm1"}}