{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/8805","repository_url":"https://api.github.com/repos/systemd/systemd","labels_url":"https://api.github.com/repos/systemd/systemd/issues/8805/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/8805/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/8805/events","html_url":"https://github.com/systemd/systemd/pull/8805","id":317290019,"number":8805,"title":"mtd: some basic code cleanups","user":{"login":"poettering","id":2130732,"avatar_url":"https://avatars1.githubusercontent.com/u/2130732?v=4","gravatar_id":"","url":"https://api.github.com/users/poettering","html_url":"https://github.com/poettering","followers_url":"https://api.github.com/users/poettering/followers","following_url":"https://api.github.com/users/poettering/following{/other_user}","gists_url":"https://api.github.com/users/poettering/gists{/gist_id}","starred_url":"https://api.github.com/users/poettering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poettering/subscriptions","organizations_url":"https://api.github.com/users/poettering/orgs","repos_url":"https://api.github.com/users/poettering/repos","events_url":"https://api.github.com/users/poettering/events{/privacy}","received_events_url":"https://api.github.com/users/poettering/received_events","type":"User","site_admin":false},"labels":[{"id":219549617,"url":"https://api.github.com/repos/systemd/systemd/labels/udev","name":"udev","color":"f7c6c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-24T15:54:21Z","updated_at":"2018-05-10T17:43:03Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/systemd/systemd/pulls/8805","html_url":"https://github.com/systemd/systemd/pull/8805","diff_url":"https://github.com/systemd/systemd/pull/8805.diff","patch_url":"https://github.com/systemd/systemd/pull/8805.patch"},"body":"While looking at our exit() invocations I noticed that the mtd_probe\r\nstuff uses 'exit(-1)' at various places, which is not really a good\r\nidea, as exit codes of processes on Linux are supposed to be in the\r\nrange of 0…255.\r\n\r\nThis patch cleans that up a bit, and fixes a number of other things:\r\n\r\n1. Let's always let main() exit, nothing intermediary. We generally\r\n   don't like code that invokes exit() on its own.\r\n\r\n2. Close the file descriptors opened.\r\n\r\n3. Some logging for errors is added, mostly on debug level.\r\n\r\nPlease review this with extra care. As I don't have the right hardware\r\nto test this patch I only did superficial testing."},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/388128900","html_url":"https://github.com/systemd/systemd/pull/8805#issuecomment-388128900","issue_url":"https://api.github.com/repos/systemd/systemd/issues/8805","id":388128900,"user":{"login":"yuwata","id":14157143,"avatar_url":"https://avatars3.githubusercontent.com/u/14157143?v=4","gravatar_id":"","url":"https://api.github.com/users/yuwata","html_url":"https://github.com/yuwata","followers_url":"https://api.github.com/users/yuwata/followers","following_url":"https://api.github.com/users/yuwata/following{/other_user}","gists_url":"https://api.github.com/users/yuwata/gists{/gist_id}","starred_url":"https://api.github.com/users/yuwata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuwata/subscriptions","organizations_url":"https://api.github.com/users/yuwata/orgs","repos_url":"https://api.github.com/users/yuwata/repos","events_url":"https://api.github.com/users/yuwata/events{/privacy}","received_events_url":"https://api.github.com/users/yuwata/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T17:43:03Z","updated_at":"2018-05-10T17:43:03Z","author_association":"MEMBER","body":"lgtm, but I cannot test this."}}
{"actor":{"display_login":"yuwata"}}