{"action":"created","comment":{"url":"https://api.github.com/repos/01org/parameter-framework/pulls/comments/30684481","id":30684481,"diff_hunk":"@@ -0,0 +1,61 @@\n+/*\n+ * Copyright (c) 2011-2014, Intel Corporation\n+ * All rights reserved.\n+ *\n+ * Redistribution and use in source and binary forms, with or without modification,\n+ * are permitted provided that the following conditions are met:\n+ *\n+ * 1. Redistributions of source code must retain the above copyright notice, this\n+ * list of conditions and the following disclaimer.\n+ *\n+ * 2. Redistributions in binary form must reproduce the above copyright notice,\n+ * this list of conditions and the following disclaimer in the documentation and/or\n+ * other materials provided with the distribution.\n+ *\n+ * 3. Neither the name of the copyright holder nor the names of its contributors\n+ * may be used to endorse or promote products derived from this software without\n+ * specific prior written permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#pragma once\n+\n+#include <cstddef>\n+\n+namespace utility\n+{\n+\n+/** Write a buffer in a file descriptor.\n+ *\n+ * @see man 2 write for the parameters.\n+ *\n+ * return true if the buffer could be completely written,\n+ *        false on failure (see write's man errno section).\n+ */\n+bool fullWrite(int fd, const void *buf, size_t count);\n+\n+/** Read a buffer from a file descriptor.\n+ *\n+ * @see man 2 read for the parameters.\n+ *\n+ * return true if the buffer could be completely read,\n+ *        false on failure (see write's man errno section).\n+ *\n+ * @FIXME In case of EOF, errno will not be set but false will be returned!\n+ *        Should a errno value be picked (there is no obvious match) ?\n+ *        Should a string be returned instead of bool ?","path":"utility/FullIo.hpp","position":56,"original_position":56,"commit_id":"0141615bc07fc59b7d7f3bf96591c6de52fab2bf","original_commit_id":"509a2c24236abbbd12527fa5797d3853b210ee9b","user":{"login":"krocard","id":6862950,"avatar_url":"https://avatars.githubusercontent.com/u/6862950?v=3","gravatar_id":"","url":"https://api.github.com/users/krocard","html_url":"https://github.com/krocard","followers_url":"https://api.github.com/users/krocard/followers","following_url":"https://api.github.com/users/krocard/following{/other_user}","gists_url":"https://api.github.com/users/krocard/gists{/gist_id}","starred_url":"https://api.github.com/users/krocard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krocard/subscriptions","organizations_url":"https://api.github.com/users/krocard/orgs","repos_url":"https://api.github.com/users/krocard/repos","events_url":"https://api.github.com/users/krocard/events{/privacy}","received_events_url":"https://api.github.com/users/krocard/received_events","type":"User","site_admin":false},"body":"EOF must be an error, because the buffer could not be *fully* read if it appends (function contract).\r\nI agree with clero, errno to success and false return could indicate an EOF. The only problem is that it will require more code from the client (more than just calling `strerror(errno)` to get an human readable message).","created_at":"2015-05-20T09:32:22Z","updated_at":"2015-05-20T09:32:22Z","html_url":"https://github.com/01org/parameter-framework/pull/29#discussion_r30684481","pull_request_url":"https://api.github.com/repos/01org/parameter-framework/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/01org/parameter-framework/pulls/comments/30684481"},"html":{"href":"https://github.com/01org/parameter-framework/pull/29#discussion_r30684481"},"pull_request":{"href":"https://api.github.com/repos/01org/parameter-framework/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/01org/parameter-framework/pulls/29","id":25588294,"html_url":"https://github.com/01org/parameter-framework/pull/29","diff_url":"https://github.com/01org/parameter-framework/pull/29.diff","patch_url":"https://github.com/01org/parameter-framework/pull/29.patch","issue_url":"https://api.github.com/repos/01org/parameter-framework/issues/29","number":29,"state":"open","locked":false,"title":"Check libc call failure","user":{"login":"krocard","id":6862950,"avatar_url":"https://avatars.githubusercontent.com/u/6862950?v=3","gravatar_id":"","url":"https://api.github.com/users/krocard","html_url":"https://github.com/krocard","followers_url":"https://api.github.com/users/krocard/followers","following_url":"https://api.github.com/users/krocard/following{/other_user}","gists_url":"https://api.github.com/users/krocard/gists{/gist_id}","starred_url":"https://api.github.com/users/krocard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krocard/subscriptions","organizations_url":"https://api.github.com/users/krocard/orgs","repos_url":"https://api.github.com/users/krocard/repos","events_url":"https://api.github.com/users/krocard/events{/privacy}","received_events_url":"https://api.github.com/users/krocard/received_events","type":"User","site_admin":false},"body":"The parameter framework was not compiling on chrome because the libc is forcing call status to be checked  \r\n\r\nHandle failure of calls by returning an error if possible or just logging if not.\r\n","created_at":"2014-12-05T18:02:22Z","updated_at":"2015-05-20T09:32:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f53e01ad5189eebcc1b9b0cb500898abdb72d1b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/01org/parameter-framework/pulls/29/commits","review_comments_url":"https://api.github.com/repos/01org/parameter-framework/pulls/29/comments","review_comment_url":"https://api.github.com/repos/01org/parameter-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/01org/parameter-framework/issues/29/comments","statuses_url":"https://api.github.com/repos/01org/parameter-framework/statuses/0141615bc07fc59b7d7f3bf96591c6de52fab2bf","head":{"label":"krocard:check_libc_call_failure","ref":"check_libc_call_failure","sha":"0141615bc07fc59b7d7f3bf96591c6de52fab2bf","user":{"login":"krocard","id":6862950,"avatar_url":"https://avatars.githubusercontent.com/u/6862950?v=3","gravatar_id":"","url":"https://api.github.com/users/krocard","html_url":"https://github.com/krocard","followers_url":"https://api.github.com/users/krocard/followers","following_url":"https://api.github.com/users/krocard/following{/other_user}","gists_url":"https://api.github.com/users/krocard/gists{/gist_id}","starred_url":"https://api.github.com/users/krocard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krocard/subscriptions","organizations_url":"https://api.github.com/users/krocard/orgs","repos_url":"https://api.github.com/users/krocard/repos","events_url":"https://api.github.com/users/krocard/events{/privacy}","received_events_url":"https://api.github.com/users/krocard/received_events","type":"User","site_admin":false},"repo":{"id":24673385,"name":"parameter-framework","full_name":"krocard/parameter-framework","owner":{"login":"krocard","id":6862950,"avatar_url":"https://avatars.githubusercontent.com/u/6862950?v=3","gravatar_id":"","url":"https://api.github.com/users/krocard","html_url":"https://github.com/krocard","followers_url":"https://api.github.com/users/krocard/followers","following_url":"https://api.github.com/users/krocard/following{/other_user}","gists_url":"https://api.github.com/users/krocard/gists{/gist_id}","starred_url":"https://api.github.com/users/krocard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krocard/subscriptions","organizations_url":"https://api.github.com/users/krocard/orgs","repos_url":"https://api.github.com/users/krocard/repos","events_url":"https://api.github.com/users/krocard/events{/privacy}","received_events_url":"https://api.github.com/users/krocard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/krocard/parameter-framework","description":"Plugin-based and rule-based framework for describing and controlling parameters","fork":true,"url":"https://api.github.com/repos/krocard/parameter-framework","forks_url":"https://api.github.com/repos/krocard/parameter-framework/forks","keys_url":"https://api.github.com/repos/krocard/parameter-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krocard/parameter-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krocard/parameter-framework/teams","hooks_url":"https://api.github.com/repos/krocard/parameter-framework/hooks","issue_events_url":"https://api.github.com/repos/krocard/parameter-framework/issues/events{/number}","events_url":"https://api.github.com/repos/krocard/parameter-framework/events","assignees_url":"https://api.github.com/repos/krocard/parameter-framework/assignees{/user}","branches_url":"https://api.github.com/repos/krocard/parameter-framework/branches{/branch}","tags_url":"https://api.github.com/repos/krocard/parameter-framework/tags","blobs_url":"https://api.github.com/repos/krocard/parameter-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krocard/parameter-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krocard/parameter-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/krocard/parameter-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krocard/parameter-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/krocard/parameter-framework/languages","stargazers_url":"https://api.github.com/repos/krocard/parameter-framework/stargazers","contributors_url":"https://api.github.com/repos/krocard/parameter-framework/contributors","subscribers_url":"https://api.github.com/repos/krocard/parameter-framework/subscribers","subscription_url":"https://api.github.com/repos/krocard/parameter-framework/subscription","commits_url":"https://api.github.com/repos/krocard/parameter-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/krocard/parameter-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/krocard/parameter-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/krocard/parameter-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/krocard/parameter-framework/contents/{+path}","compare_url":"https://api.github.com/repos/krocard/parameter-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krocard/parameter-framework/merges","archive_url":"https://api.github.com/repos/krocard/parameter-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krocard/parameter-framework/downloads","issues_url":"https://api.github.com/repos/krocard/parameter-framework/issues{/number}","pulls_url":"https://api.github.com/repos/krocard/parameter-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/krocard/parameter-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/krocard/parameter-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krocard/parameter-framework/labels{/name}","releases_url":"https://api.github.com/repos/krocard/parameter-framework/releases{/id}","created_at":"2014-10-01T09:54:18Z","updated_at":"2015-04-13T15:36:05Z","pushed_at":"2015-05-20T09:28:26Z","git_url":"git://github.com/krocard/parameter-framework.git","ssh_url":"git@github.com:krocard/parameter-framework.git","clone_url":"https://github.com/krocard/parameter-framework.git","svn_url":"https://github.com/krocard/parameter-framework","homepage":"","size":3376,"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":"01org:master","ref":"master","sha":"9d1bcf046870f2c3bafede70dbb86c977b93c360","user":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"repo":{"id":16009363,"name":"parameter-framework","full_name":"01org/parameter-framework","owner":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/01org/parameter-framework","description":"Plugin-based and rule-based framework for describing and controlling parameters","fork":false,"url":"https://api.github.com/repos/01org/parameter-framework","forks_url":"https://api.github.com/repos/01org/parameter-framework/forks","keys_url":"https://api.github.com/repos/01org/parameter-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/01org/parameter-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/01org/parameter-framework/teams","hooks_url":"https://api.github.com/repos/01org/parameter-framework/hooks","issue_events_url":"https://api.github.com/repos/01org/parameter-framework/issues/events{/number}","events_url":"https://api.github.com/repos/01org/parameter-framework/events","assignees_url":"https://api.github.com/repos/01org/parameter-framework/assignees{/user}","branches_url":"https://api.github.com/repos/01org/parameter-framework/branches{/branch}","tags_url":"https://api.github.com/repos/01org/parameter-framework/tags","blobs_url":"https://api.github.com/repos/01org/parameter-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/01org/parameter-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/01org/parameter-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/01org/parameter-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/01org/parameter-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/01org/parameter-framework/languages","stargazers_url":"https://api.github.com/repos/01org/parameter-framework/stargazers","contributors_url":"https://api.github.com/repos/01org/parameter-framework/contributors","subscribers_url":"https://api.github.com/repos/01org/parameter-framework/subscribers","subscription_url":"https://api.github.com/repos/01org/parameter-framework/subscription","commits_url":"https://api.github.com/repos/01org/parameter-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/01org/parameter-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/01org/parameter-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/01org/parameter-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/01org/parameter-framework/contents/{+path}","compare_url":"https://api.github.com/repos/01org/parameter-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/01org/parameter-framework/merges","archive_url":"https://api.github.com/repos/01org/parameter-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/01org/parameter-framework/downloads","issues_url":"https://api.github.com/repos/01org/parameter-framework/issues{/number}","pulls_url":"https://api.github.com/repos/01org/parameter-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/01org/parameter-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/01org/parameter-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/01org/parameter-framework/labels{/name}","releases_url":"https://api.github.com/repos/01org/parameter-framework/releases{/id}","created_at":"2014-01-17T19:24:01Z","updated_at":"2015-04-24T08:33:44Z","pushed_at":"2015-05-20T09:28:26Z","git_url":"git://github.com/01org/parameter-framework.git","ssh_url":"git@github.com:01org/parameter-framework.git","clone_url":"https://github.com/01org/parameter-framework.git","svn_url":"https://github.com/01org/parameter-framework","homepage":"","size":44554,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":24,"forks":17,"open_issues":24,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/01org/parameter-framework/pulls/29"},"html":{"href":"https://github.com/01org/parameter-framework/pull/29"},"issue":{"href":"https://api.github.com/repos/01org/parameter-framework/issues/29"},"comments":{"href":"https://api.github.com/repos/01org/parameter-framework/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/01org/parameter-framework/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/01org/parameter-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/01org/parameter-framework/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/01org/parameter-framework/statuses/0141615bc07fc59b7d7f3bf96591c6de52fab2bf"}}}}