{"action":"created","issue":{"url":"https://api.github.com/repos/linux-sunxi/sunxi-tools/issues/33","labels_url":"https://api.github.com/repos/linux-sunxi/sunxi-tools/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/linux-sunxi/sunxi-tools/issues/33/comments","events_url":"https://api.github.com/repos/linux-sunxi/sunxi-tools/issues/33/events","html_url":"https://github.com/linux-sunxi/sunxi-tools/pull/33","id":112497248,"number":33,"title":"added option --progress which shows a simple progress bar","user":{"login":"kaplan2539","id":3965084,"avatar_url":"https://avatars.githubusercontent.com/u/3965084?v=3","gravatar_id":"","url":"https://api.github.com/users/kaplan2539","html_url":"https://github.com/kaplan2539","followers_url":"https://api.github.com/users/kaplan2539/followers","following_url":"https://api.github.com/users/kaplan2539/following{/other_user}","gists_url":"https://api.github.com/users/kaplan2539/gists{/gist_id}","starred_url":"https://api.github.com/users/kaplan2539/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaplan2539/subscriptions","organizations_url":"https://api.github.com/users/kaplan2539/orgs","repos_url":"https://api.github.com/users/kaplan2539/repos","events_url":"https://api.github.com/users/kaplan2539/events{/privacy}","received_events_url":"https://api.github.com/users/kaplan2539/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-21T02:16:50Z","updated_at":"2015-10-22T23:04:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/linux-sunxi/sunxi-tools/pulls/33","html_url":"https://github.com/linux-sunxi/sunxi-tools/pull/33","diff_url":"https://github.com/linux-sunxi/sunxi-tools/pull/33.diff","patch_url":"https://github.com/linux-sunxi/sunxi-tools/pull/33.patch"},"body":"Hey,\r\n\r\nI added the option '--progress' or '-p' to show some progress bar on the screen while uploading large files via fel write. Hope this is useful.\r\n\r\nCheers\r\nAlex"},"comment":{"url":"https://api.github.com/repos/linux-sunxi/sunxi-tools/issues/comments/150379807","html_url":"https://github.com/linux-sunxi/sunxi-tools/pull/33#issuecomment-150379807","issue_url":"https://api.github.com/repos/linux-sunxi/sunxi-tools/issues/33","id":150379807,"user":{"login":"ssvb","id":78642,"avatar_url":"https://avatars.githubusercontent.com/u/78642?v=3","gravatar_id":"","url":"https://api.github.com/users/ssvb","html_url":"https://github.com/ssvb","followers_url":"https://api.github.com/users/ssvb/followers","following_url":"https://api.github.com/users/ssvb/following{/other_user}","gists_url":"https://api.github.com/users/ssvb/gists{/gist_id}","starred_url":"https://api.github.com/users/ssvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssvb/subscriptions","organizations_url":"https://api.github.com/users/ssvb/orgs","repos_url":"https://api.github.com/users/ssvb/repos","events_url":"https://api.github.com/users/ssvb/events{/privacy}","received_events_url":"https://api.github.com/users/ssvb/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T23:04:07Z","updated_at":"2015-10-22T23:04:07Z","body":"Hi,\r\n\r\nUsually patches are sent to the linux-sunxi mailing list with the \"[PATCH sunxi-tools M/N]\" prefix in the subject line. This can be done with the help of \"git format-patch\" and \"git send-email\" commands.\r\n\r\nRegarding your patch, there are some things that might need to be fixed:\r\n1. Inconsistent coding style. The rest of the code is using spaces to separate brackets and operators, for example we use \"if (...)\" instead of \"if(...)\".\r\n2. The new '-p' command line option is not documented in the \"help\" message.\r\n3. The '-v' and '-p' options may not be processed correctly if they are used together, depending on their order.\r\n4. It would be probably cleaner to add a progress callback function argument to the \"usb_bulk_send()\" function instead of doing all the progress bar animation there directly. Because this is a low level helper function and it has a wider use than just uploading large files when handling one or more \"write\" command line options."}}