{"action":"created","comment":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/61265135","id":61265135,"diff_hunk":"@@ -181,37 +181,33 @@ _get_enum_prop(const char *name, enum sol_power_supply_prop prop,\n     return 0;\n }\n \n-static bool\n+static enum sol_util_iterate_dir_reason\n _list_supplies_cb(void *data, const char *dir_path, struct dirent *ent)\n {\n     struct list_data *ldata = data;\n     enum sol_power_supply_type type;\n     char *name;\n     int r;\n \n-    if ((!strcmp(ent->d_name, \".\")) || (!strcmp(ent->d_name, \"..\"))) {\n-        return false;\n-    }\n-\n     if (ldata->check_type) {\n         r = sol_power_supply_get_type(ent->d_name, &type);\n-        SOL_INT_CHECK(r, < 0, false);\n+        SOL_INT_CHECK(r, < 0, SOL_UTIL_ITERATE_DIR_CONTINUE);\n \n         if (type != ldata->type)\n-            return false;\n+            return SOL_UTIL_ITERATE_DIR_CONTINUE;\n     }\n \n     name = strdup(ent->d_name);\n-    SOL_NULL_CHECK(name, false);\n+    SOL_NULL_CHECK(name, -ENOMEM);\n \n     r = sol_ptr_vector_append(ldata->list, name);\n     if (r < 0) {\n         SOL_WRN(\"Failed to append supply to list %s\", name);\n         free(name);\n-        return false;\n+        return r;","path":"src/lib/common/sol-power-supply-impl-linux.c","position":36,"original_position":36,"commit_id":"cfe7b7cb09456c36ab2a04fd1a24815e993f0f3a","original_commit_id":"50301098ec7a9853d9d82e7b84e562e69ea2709d","user":{"login":"edersondisouza","id":3177551,"avatar_url":"https://avatars.githubusercontent.com/u/3177551?v=3","gravatar_id":"","url":"https://api.github.com/users/edersondisouza","html_url":"https://github.com/edersondisouza","followers_url":"https://api.github.com/users/edersondisouza/followers","following_url":"https://api.github.com/users/edersondisouza/following{/other_user}","gists_url":"https://api.github.com/users/edersondisouza/gists{/gist_id}","starred_url":"https://api.github.com/users/edersondisouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edersondisouza/subscriptions","organizations_url":"https://api.github.com/users/edersondisouza/orgs","repos_url":"https://api.github.com/users/edersondisouza/repos","events_url":"https://api.github.com/users/edersondisouza/events{/privacy}","received_events_url":"https://api.github.com/users/edersondisouza/received_events","type":"User","site_admin":false},"body":"On 27-04-2016 11:14, Gustavo Lima Chaves wrote:\n> In src/lib/common/sol-power-supply-impl-linux.c\n> <https://github.com/solettaproject/soletta/pull/1940#discussion_r61264234>:\n>\n>>\n>>      r = sol_ptr_vector_append(ldata->list, name);\n>>      if (r < 0) {\n>>          SOL_WRN(\"Failed to append supply to list %s\", name);\n>>          free(name);\n>> -        return false;\n>> +        return r;\n>\n> That's my point -- under memory shortage there's no point in continuing\n\nFair.\n\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly or view it on GitHub\n> <https://github.com/solettaproject/soletta/pull/1940/files/6d8331b377358a901201bc6c10b1e969c7f5328c..50301098ec7a9853d9d82e7b84e562e69ea2709d#r61264234>\n>\n\n","created_at":"2016-04-27T14:19:58Z","updated_at":"2016-04-27T14:19:58Z","html_url":"https://github.com/solettaproject/soletta/pull/1940#discussion_r61265135","pull_request_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1940","_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/61265135"},"html":{"href":"https://github.com/solettaproject/soletta/pull/1940#discussion_r61265135"},"pull_request":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1940"}}},"pull_request":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/1940","id":67966210,"html_url":"https://github.com/solettaproject/soletta/pull/1940","diff_url":"https://github.com/solettaproject/soletta/pull/1940.diff","patch_url":"https://github.com/solettaproject/soletta/pull/1940.patch","issue_url":"https://api.github.com/repos/solettaproject/soletta/issues/1940","number":1940,"state":"open","locked":false,"title":"Alias support on flows [v2]","user":{"login":"glima","id":67689,"avatar_url":"https://avatars.githubusercontent.com/u/67689?v=3","gravatar_id":"","url":"https://api.github.com/users/glima","html_url":"https://github.com/glima","followers_url":"https://api.github.com/users/glima/followers","following_url":"https://api.github.com/users/glima/following{/other_user}","gists_url":"https://api.github.com/users/glima/gists{/gist_id}","starred_url":"https://api.github.com/users/glima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glima/subscriptions","organizations_url":"https://api.github.com/users/glima/orgs","repos_url":"https://api.github.com/users/glima/repos","events_url":"https://api.github.com/users/glima/events{/privacy}","received_events_url":"https://api.github.com/users/glima/received_events","type":"User","site_admin":false},"body":"Changes since v1:\r\n- the python tool now receives individual files to act upon\r\n- some issues raised by @edersondisouza and @barbieri fixed\r\n- it will now resolve aliases from all scenarios possible\r\n- it will install the alias file properly\r\n\r\nWe could have a way to access aliases on the stage dir, but that can come later.","created_at":"2016-04-26T22:06:02Z","updated_at":"2016-04-27T14:19:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a56892a0c1d56c57d92376b3bcc7377054411766","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1940/commits","review_comments_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1940/comments","review_comment_url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solettaproject/soletta/issues/1940/comments","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/cfe7b7cb09456c36ab2a04fd1a24815e993f0f3a","head":{"label":"glima:alias","ref":"alias","sha":"cfe7b7cb09456c36ab2a04fd1a24815e993f0f3a","user":{"login":"glima","id":67689,"avatar_url":"https://avatars.githubusercontent.com/u/67689?v=3","gravatar_id":"","url":"https://api.github.com/users/glima","html_url":"https://github.com/glima","followers_url":"https://api.github.com/users/glima/followers","following_url":"https://api.github.com/users/glima/following{/other_user}","gists_url":"https://api.github.com/users/glima/gists{/gist_id}","starred_url":"https://api.github.com/users/glima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glima/subscriptions","organizations_url":"https://api.github.com/users/glima/orgs","repos_url":"https://api.github.com/users/glima/repos","events_url":"https://api.github.com/users/glima/events{/privacy}","received_events_url":"https://api.github.com/users/glima/received_events","type":"User","site_admin":false},"repo":{"id":37601201,"name":"soletta","full_name":"glima/soletta","owner":{"login":"glima","id":67689,"avatar_url":"https://avatars.githubusercontent.com/u/67689?v=3","gravatar_id":"","url":"https://api.github.com/users/glima","html_url":"https://github.com/glima","followers_url":"https://api.github.com/users/glima/followers","following_url":"https://api.github.com/users/glima/following{/other_user}","gists_url":"https://api.github.com/users/glima/gists{/gist_id}","starred_url":"https://api.github.com/users/glima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glima/subscriptions","organizations_url":"https://api.github.com/users/glima/orgs","repos_url":"https://api.github.com/users/glima/repos","events_url":"https://api.github.com/users/glima/events{/privacy}","received_events_url":"https://api.github.com/users/glima/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glima/soletta","description":"Soletta Project is a framework for making IoT devices.","fork":true,"url":"https://api.github.com/repos/glima/soletta","forks_url":"https://api.github.com/repos/glima/soletta/forks","keys_url":"https://api.github.com/repos/glima/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glima/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glima/soletta/teams","hooks_url":"https://api.github.com/repos/glima/soletta/hooks","issue_events_url":"https://api.github.com/repos/glima/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/glima/soletta/events","assignees_url":"https://api.github.com/repos/glima/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/glima/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/glima/soletta/tags","blobs_url":"https://api.github.com/repos/glima/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glima/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glima/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/glima/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glima/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/glima/soletta/languages","stargazers_url":"https://api.github.com/repos/glima/soletta/stargazers","contributors_url":"https://api.github.com/repos/glima/soletta/contributors","subscribers_url":"https://api.github.com/repos/glima/soletta/subscribers","subscription_url":"https://api.github.com/repos/glima/soletta/subscription","commits_url":"https://api.github.com/repos/glima/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/glima/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/glima/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/glima/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/glima/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/glima/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glima/soletta/merges","archive_url":"https://api.github.com/repos/glima/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glima/soletta/downloads","issues_url":"https://api.github.com/repos/glima/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/glima/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/glima/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/glima/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glima/soletta/labels{/name}","releases_url":"https://api.github.com/repos/glima/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/glima/soletta/deployments","created_at":"2015-06-17T14:49:23Z","updated_at":"2016-02-24T20:47:43Z","pushed_at":"2016-04-26T22:03:37Z","git_url":"git://github.com/glima/soletta.git","ssh_url":"git@github.com:glima/soletta.git","clone_url":"https://github.com/glima/soletta.git","svn_url":"https://github.com/glima/soletta","homepage":"","size":18770,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"solettaproject:master","ref":"master","sha":"1d50dd27da4212877d0d98e1c2d1b8597859aa2d","user":{"login":"solettaproject","id":12736897,"avatar_url":"https://avatars.githubusercontent.com/u/12736897?v=3","gravatar_id":"","url":"https://api.github.com/users/solettaproject","html_url":"https://github.com/solettaproject","followers_url":"https://api.github.com/users/solettaproject/followers","following_url":"https://api.github.com/users/solettaproject/following{/other_user}","gists_url":"https://api.github.com/users/solettaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/solettaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solettaproject/subscriptions","organizations_url":"https://api.github.com/users/solettaproject/orgs","repos_url":"https://api.github.com/users/solettaproject/repos","events_url":"https://api.github.com/users/solettaproject/events{/privacy}","received_events_url":"https://api.github.com/users/solettaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":37087063,"name":"soletta","full_name":"solettaproject/soletta","owner":{"login":"solettaproject","id":12736897,"avatar_url":"https://avatars.githubusercontent.com/u/12736897?v=3","gravatar_id":"","url":"https://api.github.com/users/solettaproject","html_url":"https://github.com/solettaproject","followers_url":"https://api.github.com/users/solettaproject/followers","following_url":"https://api.github.com/users/solettaproject/following{/other_user}","gists_url":"https://api.github.com/users/solettaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/solettaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solettaproject/subscriptions","organizations_url":"https://api.github.com/users/solettaproject/orgs","repos_url":"https://api.github.com/users/solettaproject/repos","events_url":"https://api.github.com/users/solettaproject/events{/privacy}","received_events_url":"https://api.github.com/users/solettaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solettaproject/soletta","description":"Soletta Project is a framework for making IoT devices.  With Soletta Project's libraries developers can easily write software for devices that control actuators/sensors and communicate using standard technologies. It enables adding smartness even on the smallest edge devices.  ","fork":false,"url":"https://api.github.com/repos/solettaproject/soletta","forks_url":"https://api.github.com/repos/solettaproject/soletta/forks","keys_url":"https://api.github.com/repos/solettaproject/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solettaproject/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solettaproject/soletta/teams","hooks_url":"https://api.github.com/repos/solettaproject/soletta/hooks","issue_events_url":"https://api.github.com/repos/solettaproject/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/solettaproject/soletta/events","assignees_url":"https://api.github.com/repos/solettaproject/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/solettaproject/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/solettaproject/soletta/tags","blobs_url":"https://api.github.com/repos/solettaproject/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solettaproject/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solettaproject/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/solettaproject/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/solettaproject/soletta/languages","stargazers_url":"https://api.github.com/repos/solettaproject/soletta/stargazers","contributors_url":"https://api.github.com/repos/solettaproject/soletta/contributors","subscribers_url":"https://api.github.com/repos/solettaproject/soletta/subscribers","subscription_url":"https://api.github.com/repos/solettaproject/soletta/subscription","commits_url":"https://api.github.com/repos/solettaproject/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/solettaproject/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/solettaproject/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/solettaproject/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/solettaproject/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/solettaproject/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solettaproject/soletta/merges","archive_url":"https://api.github.com/repos/solettaproject/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solettaproject/soletta/downloads","issues_url":"https://api.github.com/repos/solettaproject/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/solettaproject/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/solettaproject/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/solettaproject/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solettaproject/soletta/labels{/name}","releases_url":"https://api.github.com/repos/solettaproject/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/solettaproject/soletta/deployments","created_at":"2015-06-08T19:13:18Z","updated_at":"2016-04-25T14:52:03Z","pushed_at":"2016-04-27T07:39:19Z","git_url":"git://github.com/solettaproject/soletta.git","ssh_url":"git@github.com:solettaproject/soletta.git","clone_url":"https://github.com/solettaproject/soletta.git","svn_url":"https://github.com/solettaproject/soletta","homepage":"http://solettaproject.org","size":25934,"stargazers_count":86,"watchers_count":86,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"open_issues_count":176,"forks":73,"open_issues":176,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1940"},"html":{"href":"https://github.com/solettaproject/soletta/pull/1940"},"issue":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/1940"},"comments":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/1940/comments"},"review_comments":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1940/comments"},"review_comment":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1940/commits"},"statuses":{"href":"https://api.github.com/repos/solettaproject/soletta/statuses/cfe7b7cb09456c36ab2a04fd1a24815e993f0f3a"}}}}